function PagerExamplePage::create

Same name in other branches
  1. 8.x-1.x pager_example/src/Controller/PagerExamplePage.php \Drupal\pager_example\Controller\PagerExamplePage::create()
  2. 4.0.x modules/pager_example/src/Controller/PagerExamplePage.php \Drupal\pager_example\Controller\PagerExamplePage::create()

Overrides ControllerBase::create

File

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

Class

PagerExamplePage
Controller for pager_example.page route.

Namespace

Drupal\pager_example\Controller

Code

public static function create(ContainerInterface $container) {
    $controller = new static($container->get('entity_type.manager')
        ->getStorage('node'), $container->get('current_user'));
    $controller->setStringTranslation($container->get('string_translation'));
    return $controller;
}