src/Security/TenderStatus/ConsentOrCloser.php line 13
<?phpnamespace App\Security\TenderStatus;use App\Enum\TenderStatusEnum;use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;use Symfony\Component\Security\Core\Authorization\Voter\Voter;/*** Class ConsentOrCloser* @package App\Security\TenderStatus*/class ConsentOrCloser extends Voter{/*** @param string $attribute* @param mixed $subject* @return bool*/protected function supports(string $attribute, $subject) :bool{if ($attribute === 'tender_consent_closed_status') {return true;}return false;}/*** @param string $attribute* @param mixed $subject* @param TokenInterface $token* @return bool*/protected function voteOnAttribute(string $attribute, $subject, TokenInterface $token) :bool{$status = $subject->getStatus();if ($status === TenderStatusEnum::SUGLASNOSTI || $status === TenderStatusEnum::ZATVORENO) {return true;}return false;}}