function CallsDestructableServiceController::create

Same name and namespace in other branches
  1. 11.x core/modules/system/tests/modules/destructable_test/src/Controller/CallsDestructableServiceController.php \Drupal\destructable_test\Controller\CallsDestructableServiceController::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/destructable_test/src/Controller/CallsDestructableServiceController.php, line 26

Class

CallsDestructableServiceController
Controller to instantiate the destructable service.

Namespace

Drupal\destructable_test\Controller

Code

public static function create(ContainerInterface $container) {
  return new static($container->get(Destructable::class));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.