public function ContainerAwareInterface::setContainer

Sets the Container.

@api

Parameters

ContainerInterface|null $container A ContainerInterface instance or null:

2 methods override ContainerAwareInterface::setContainer()
ContainerAware::setContainer in drupal/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ContainerAware.php
Sets the Container associated with this Controller.
HtmlFormController::setContainer in drupal/core/lib/Drupal/Core/Controller/HtmlFormController.php
Injects the service container used by this object.

File

drupal/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ContainerAwareInterface.php, line 30

Class

ContainerAwareInterface
ContainerAwareInterface should be implemented by classes that depends on a Container.

Namespace

Symfony\Component\DependencyInjection

Code

public function setContainer(ContainerInterface $container = null);