function PagerExamplePage::create

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

Overrides AutowireTrait::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;
}