protected function CalendarEventAccess::checkCreateAccess in Opigno calendar event 3.x
Same name and namespace in other branches
- 8 src/CalendarEventAccess.php \Drupal\opigno_calendar_event\CalendarEventAccess::checkCreateAccess()
File
- src/
CalendarEventAccess.php, line 45
Class
- CalendarEventAccess
- Defines access control handler for the calendar event entity type.
Namespace
Drupal\opigno_calendar_eventCode
protected function checkCreateAccess(AccountInterface $account, array $context, $entity_bundle = NULL) {
if ($account
->hasPermission('create opigno_calendar_event')) {
return AccessResult::allowed();
}
return AccessResult::forbidden();
}