function TableSortExampleController::create
Instantiates a new instance of the implementing class using autowiring.
Parameters
\Symfony\Component\DependencyInjection\ContainerInterface $container: The service container this instance should use.
Return value
static
Overrides AutowireTrait::create
File
-
modules/
tablesort_example/ src/ Controller/ TableSortExampleController.php, line 24
Class
- TableSortExampleController
- Controller routines for tablesort example routes.
Namespace
Drupal\tablesort_example\ControllerCode
public static function create(ContainerInterface $container) {
$controller = new static($container->get('database'));
$controller->setStringTranslation($container->get('string_translation'));
return $controller;
}