class FieldPermissionExampleController
Same name in other branches
- 3.x modules/field_permission_example/src/Controller/FieldPermissionExampleController.php \Drupal\field_permission_example\Controller\FieldPermissionExampleController
- 4.0.x modules/field_permission_example/src/Controller/FieldPermissionExampleController.php \Drupal\field_permission_example\Controller\FieldPermissionExampleController
Controller routines for field permission example routes.
Hierarchy
- class \Drupal\field_permission_example\Controller\FieldPermissionExampleController extends \Drupal\Core\Controller\ControllerBase
Expanded class hierarchy of FieldPermissionExampleController
File
-
field_permission_example/
src/ Controller/ FieldPermissionExampleController.php, line 11
Namespace
Drupal\field_permission_example\ControllerView source
class FieldPermissionExampleController extends ControllerBase {
/**
* A simple controller method to explain what this example is about.
*/
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;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
FieldPermissionExampleController::description | public | function | A simple controller method to explain what this example is about. |