/** * @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); }
/** * @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); }