You are here

public function PagerExamplePage::__construct in Examples for Developers 3.x

Same name and namespace in other branches
  1. 8 pager_example/src/Controller/PagerExamplePage.php \Drupal\pager_example\Controller\PagerExamplePage::__construct()

PagerExamplePage constructor.

Parameters

\Drupal\Core\Entity\EntityStorageInterface $node_storage: Entity storage for node entities.

\Drupal\Core\Session\AccountInterface $current_user: The current user.

File

modules/pager_example/src/Controller/PagerExamplePage.php, line 42

Class

PagerExamplePage
Controller for pager_example.page route.

Namespace

Drupal\pager_example\Controller

Code

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