function MenuExampleController::customAccessPage
Same name in other branches
- 3.x modules/menu_example/src/Controller/MenuExampleController.php \Drupal\menu_example\Controller\MenuExampleController::customAccessPage()
Content will be displayed only if access check is satisfied.
See also
\Drupal\menu_example\Controller\MenuExampleController::customAccess()
1 string reference to 'MenuExampleController::customAccessPage'
- menu_example.routing.yml in modules/
menu_example/ menu_example.routing.yml - modules/menu_example/menu_example.routing.yml
File
-
modules/
menu_example/ src/ Controller/ MenuExampleController.php, line 106
Class
- MenuExampleController
- Controller routines for menu example routes.
Namespace
Drupal\menu_example\ControllerCode
public function customAccessPage() {
return [
'#markup' => $this->t('This menu entry will not be visible and access will result
in a 403 error unless the user has the "authenticated" role. This is
accomplished with a custom access check plugin.'),
];
}