protected function FormModesSubscriber::getFormModeRouteRequirements in Form mode manager 8
Same name and namespace in other branches
- 8.2 src/Routing/EventSubscriber/FormModesSubscriber.php \Drupal\form_mode_manager\Routing\EventSubscriber\FormModesSubscriber::getFormModeRouteRequirements()
Get options requirements nedeed to build Form Mode Manager routes.
Parameters
array $form_mode: The form mode info.
Return value
array Array contain requirements routes parameters.
1 call to FormModesSubscriber::getFormModeRouteRequirements()
- FormModesSubscriber::setRoutes in src/
Routing/ EventSubscriber/ FormModesSubscriber.php - Set Form Mode Manager routes based on parent entity routes.
File
- src/
Routing/ EventSubscriber/ FormModesSubscriber.php, line 352
Class
- FormModesSubscriber
- Subscriber for form_mode_manager routes.
Namespace
Drupal\form_mode_manager\Routing\EventSubscriberCode
protected function getFormModeRouteRequirements(array $form_mode) {
return [
'_permission' => "use {$form_mode['id']} form mode",
'_custom_access' => static::FORM_MODE_DEFAULT_CONTROLLER . '::checkAccess',
];
}