function FieldPermissionExampleController::description
Same name in other branches
- 3.x modules/field_permission_example/src/Controller/FieldPermissionExampleController.php \Drupal\field_permission_example\Controller\FieldPermissionExampleController::description()
- 8.x-1.x field_permission_example/src/Controller/FieldPermissionExampleController.php \Drupal\field_permission_example\Controller\FieldPermissionExampleController::description()
A simple controller method to explain what this example is about.
1 string reference to 'FieldPermissionExampleController::description'
- field_permission_example.routing.yml in modules/
field_permission_example/ field_permission_example.routing.yml - modules/field_permission_example/field_permission_example.routing.yml
File
-
modules/
field_permission_example/ src/ Controller/ FieldPermissionExampleController.php, line 16
Class
- FieldPermissionExampleController
- Controller routines for field permission example routes.
Namespace
Drupal\field_permission_example\ControllerCode
public function description() {
// Make a link from a route to the permissions admin page.
$permissions_admin_link = Link::createFromRoute($this->t('the permissions admin page'), 'user.admin_permissions')
->toString();
$build = [
'description' => [
'#theme' => 'field_permission_description',
'#admin_link' => $permissions_admin_link,
],
];
return $build;
}