abstract class ContainerAware

A simple implementation of ContainerAwareInterface.

@author Fabien Potencier <fabien@symfony.com>

@api

Hierarchy

Expanded class hierarchy of ContainerAware

14 files declare their use of ContainerAware
AccessManager.php in drupal/core/lib/Drupal/Core/Access/AccessManager.php
Contains Drupal\Core\Access\AccessManager.
AjaxController.php in drupal/core/lib/Drupal/Core/Controller/AjaxController.php
Contains \Drupal\Core\Controller\AjaxController.
Bundle.php in drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Bundle/Bundle.php
CacheFactory.php in drupal/core/lib/Drupal/Core/Cache/CacheFactory.php
Contains \Drupal\Core\Cache\CacheFactory.
ContextualController.php in drupal/core/modules/contextual/lib/Drupal/contextual/ContextualController.php
Contains \Drupal\contextual\ContextualController.

... See full list

File

drupal/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ContainerAware.php, line 21

Namespace

Symfony\Component\DependencyInjection
View source
abstract class ContainerAware implements ContainerAwareInterface {

  /**
   * @var ContainerInterface
   *
   * @api
   */
  protected $container;

  /**
   * Sets the Container associated with this Controller.
   *
   * @param ContainerInterface $container A ContainerInterface instance
   *
   * @api
   */
  public function setContainer(ContainerInterface $container = null) {
    $this->container = $container;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ContainerAware::$container protected property @api
ContainerAware::setContainer public function Sets the Container associated with this Controller. Overrides ContainerAwareInterface::setContainer