public static function Drupal::setContainer in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal.php \Drupal::setContainer()
Sets a new global container.
Parameters
\Symfony\Component\DependencyInjection\ContainerInterface $container: A new container instance to replace the current.
125 calls to Drupal::setContainer()
- AccessManagerTest::setUp in core/
tests/ Drupal/ Tests/ Core/ Access/ AccessManagerTest.php - AccessResultTest::setUp in core/
tests/ Drupal/ Tests/ Core/ Access/ AccessResultTest.php - AjaxRendererTest::setUp in core/
tests/ Drupal/ Tests/ Core/ Controller/ AjaxRendererTest.php - BaseFieldDefinitionTest::setUp in core/
tests/ Drupal/ Tests/ Core/ Entity/ BaseFieldDefinitionTest.php - BaseFieldDefinitionTestBase::setUp in core/
tests/ Drupal/ Tests/ Core/ Field/ BaseFieldDefinitionTestBase.php
File
- core/
lib/ Drupal.php, line 109 - Contains \Drupal.
Class
- Drupal
- Static Service Container wrapper.
Code
public static function setContainer(ContainerInterface $container) {
static::$container = $container;
}