function RenderExampleController::__construct
Same name in other branches
- 8.x-1.x render_example/src/Controller/RenderExampleController.php \Drupal\render_example\Controller\RenderExampleController::__construct()
- 4.0.x modules/render_example/src/Controller/RenderExampleController.php \Drupal\render_example\Controller\RenderExampleController::__construct()
Constructs a new BlockController instance.
Parameters
\Drupal\Core\Session\AccountInterface $current_user: The current user.
File
-
modules/
render_example/ src/ Controller/ RenderExampleController.php, line 34
Class
- RenderExampleController
- Provides module description page and examples of building render arrays.
Namespace
Drupal\render_example\ControllerCode
public function __construct(AccountInterface $current_user) {
$this->currentUser = $current_user;
}