function DatabaseTestController::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
-
core/
modules/ system/ tests/ modules/ database_test/ src/ Controller/ DatabaseTestController.php, line 37
Class
- DatabaseTestController
- Controller routines for database_test routes.
Namespace
Drupal\database_test\ControllerCode
public static function create(ContainerInterface $container) {
return new static($container->get('database'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.