You are here

public function ContainerAware::setContainer in Service Container 7

Same name in this branch
  1. 7 src/DependencyInjection/ContainerAware.php \Drupal\service_container\DependencyInjection\ContainerAware::setContainer()
  2. 7 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/ContainerAware.php \Symfony\Component\DependencyInjection\ContainerAware::setContainer()
Same name and namespace in other branches
  1. 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/ContainerAware.php \Symfony\Component\DependencyInjection\ContainerAware::setContainer()

Sets the Container associated with this Controller.

@api

Parameters

ContainerInterface $container A ContainerInterface instance:

Overrides ContainerAwareInterface::setContainer

File

modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/ContainerAware.php, line 37

Class

ContainerAware
A simple implementation of ContainerAwareInterface.

Namespace

Symfony\Component\DependencyInjection

Code

public function setContainer(ContainerInterface $container = null) {
  $this->container = $container;
}