AppStateESS/homestead

View on GitHub
class/ApplicationFeature/SearchProfilesRegistration.php

Summary

Maintainability
A
1 hr
Test Coverage
<?php

namespace Homestead\ApplicationFeature;

use \Homestead\ApplicationFeatureRegistration;
use \Homestead\Student;
use \Homestead\Term;

class SearchProfilesRegistration extends ApplicationFeatureRegistration {
    public function __construct()
    {
        $this->name = 'SearchProfiles';
        $this->description = 'Search Student Profiles';
        $this->startDateRequired = true;
        $this->endDateRequired = true;
        $this->priority = 4;
    }

    public function showForStudent(Student $student, $term)
    {
        // For freshmen
        if($student->getApplicationTerm() > Term::getCurrentTerm())
        {
            return true;
        }

        return false;
    }
}