You are here

public function RenderExampleController::__construct in Examples for Developers 8

Same name and namespace in other branches
  1. 3.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

render_example/src/Controller/RenderExampleController.php, line 34

Class

RenderExampleController
Provides module description page and examples of building render arrays.

Namespace

Drupal\render_example\Controller

Code

public function __construct(AccountInterface $current_user) {
  $this->currentUser = $current_user;
}