public function ScheduledUpdateAddController::addFormAccess in Scheduled Updates 8
1 string reference to 'ScheduledUpdateAddController::addFormAccess'
File
- src/
Controller/ ScheduledUpdateAddController.php, line 150 - Contains Drupal\scheduled_updates\Controller\ScheduledUpdateAddController.
Class
- ScheduledUpdateAddController
- Class ScheduledUpdateAddController.
Namespace
Drupal\scheduled_updates\ControllerCode
public function addFormAccess(AccountInterface $account, ScheduledUpdateTypeInterface $scheduled_update_type) {
if ($scheduled_update_type
->isEmbeddedType()) {
return AccessResult::forbidden();
}
$type_id = $scheduled_update_type
->id();
return AccessResult::allowedIfHasPermission($account, "create {$type_id} scheduled updates");
}