예제 #1
0
 /**
  * @param string $attribute
  * @param CohortInterface $cohort
  * @param TokenInterface $token
  * @return bool
  */
 protected function voteOnAttribute($attribute, $cohort, TokenInterface $token)
 {
     $programYear = $cohort->getProgramYear();
     if (!$programYear) {
         return false;
     }
     return parent::voteOnAttribute($attribute, $programYear, $token);
 }
예제 #2
0
 /**
  * @param string $attribute
  * @param CohortInterface $cohort
  * @param UserInterface|null $user
  * @return bool
  */
 protected function isGranted($attribute, $cohort, $user = null)
 {
     return parent::isGranted($attribute, $cohort->getProgramYear(), $user);
 }