class Container
Same name in this branch
- main core/lib/Drupal/Core/Render/Element/Container.php \Drupal\Core\Render\Element\Container
- main core/lib/Drupal/Component/DependencyInjection/Container.php \Drupal\Component\DependencyInjection\Container
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Render/Element/Container.php \Drupal\Core\Render\Element\Container
- 11.x core/lib/Drupal/Core/DependencyInjection/Container.php \Drupal\Core\DependencyInjection\Container
- 11.x core/lib/Drupal/Component/DependencyInjection/Container.php \Drupal\Component\DependencyInjection\Container
- 10 core/lib/Drupal/Core/Render/Element/Container.php \Drupal\Core\Render\Element\Container
- 10 core/lib/Drupal/Core/DependencyInjection/Container.php \Drupal\Core\DependencyInjection\Container
- 10 core/lib/Drupal/Component/DependencyInjection/Container.php \Drupal\Component\DependencyInjection\Container
- 9 core/lib/Drupal/Core/Render/Element/Container.php \Drupal\Core\Render\Element\Container
- 9 core/lib/Drupal/Core/DependencyInjection/Container.php \Drupal\Core\DependencyInjection\Container
- 9 core/lib/Drupal/Component/DependencyInjection/Container.php \Drupal\Component\DependencyInjection\Container
- 8.9.x core/lib/Drupal/Core/Render/Element/Container.php \Drupal\Core\Render\Element\Container
- 8.9.x core/lib/Drupal/Core/DependencyInjection/Container.php \Drupal\Core\DependencyInjection\Container
- 8.9.x core/lib/Drupal/Component/DependencyInjection/Container.php \Drupal\Component\DependencyInjection\Container
- 7.x misc/typo3/phar-stream-wrapper/src/Phar/Container.php \TYPO3\PharStreamWrapper\Phar\Container
Extends the container to prevent serialization.
Hierarchy
- class \Drupal\Component\DependencyInjection\Container implements \Drupal\Component\DependencyInjection\ContainerInterface, \Symfony\Contracts\Service\ResetInterface
- class \Drupal\Core\DependencyInjection\Container extends \Drupal\Component\DependencyInjection\Container
Expanded class hierarchy of Container
18 files declare their use of Container
- BlockPageVariantTest.php in core/
modules/ block/ tests/ src/ Unit/ Plugin/ DisplayVariant/ BlockPageVariantTest.php - CacheTest.php in core/
tests/ Drupal/ Tests/ Core/ Cache/ CacheTest.php - ContainerTest.php in core/
tests/ Drupal/ Tests/ Core/ DependencyInjection/ ContainerTest.php - DefaultMenuLinkTreeManipulatorsTest.php in core/
tests/ Drupal/ Tests/ Core/ Menu/ DefaultMenuLinkTreeManipulatorsTest.php - EntityAccessCheckTest.php in core/
tests/ Drupal/ Tests/ Core/ Entity/ EntityAccessCheckTest.php
36 string references to 'Container'
- Actions::getInfo in core/
lib/ Drupal/ Core/ Render/ Element/ Actions.php - AddHandler::buildForm in core/
modules/ views_ui/ src/ Form/ Ajax/ AddHandler.php - ArgumentPluginBase::buildOptionsForm in core/
modules/ views/ src/ Plugin/ views/ argument/ ArgumentPluginBase.php - Provide a form to edit options for this plugin.
- card.component.yml in core/
profiles/ demo_umami/ themes/ umami/ components/ card/ card.component.yml - core/profiles/demo_umami/themes/umami/components/card/card.component.yml
- ChooseBlockController::build in core/
modules/ layout_builder/ src/ Controller/ ChooseBlockController.php - Provides the UI for choosing a new block.
File
-
core/
lib/ Drupal/ Core/ DependencyInjection/ Container.php, line 10
Namespace
Drupal\Core\DependencyInjectionView source
class Container extends DrupalContainer {
/**
* {@inheritdoc}
*/
public function __sleep() : array {
assert(FALSE, 'The container was serialized.');
return array_keys(get_object_vars($this));
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.