function ContrivedController::create

Same name in other branches
  1. 4.0.x modules/testing_example/src/Controller/ContrivedController.php \Drupal\testing_example\Controller\ContrivedController::create()

Overrides ContainerInjectionInterface::create

File

modules/testing_example/src/Controller/ContrivedController.php, line 20

Class

ContrivedController
A highly-contrived controller class used to demonstrate unit testing.

Namespace

Drupal\testing_example\Controller

Code

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