function TableSortExampleController::create

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

Overrides ControllerBase::create

File

modules/tablesort_example/src/Controller/TableSortExampleController.php, line 24

Class

TableSortExampleController
Controller routines for tablesort example routes.

Namespace

Drupal\tablesort_example\Controller

Code

public static function create(ContainerInterface $container) {
    $controller = new static($container->get('database'));
    $controller->setStringTranslation($container->get('string_translation'));
    return $controller;
}