$this->security->isGranted(CalendarVoter::EDIT, $subject->getCalendar()), self::SEE => $this->security->isGranted(CalendarVoter::SEE, $subject->getCalendar()), default => throw new \UnexpectedValueException('Attribute not supported: '.$attribute), }; } }