Drupal::$container

Same name in other branches
  1. 9 core/lib/Drupal.php \Drupal::container
  2. 10 core/lib/Drupal.php \Drupal::container
  3. 11.x core/lib/Drupal.php \Drupal::container

The currently active container object, or NULL if not initialized yet.

Type: \Symfony\Component\DependencyInjection\ContainerInterface|null

File

core/lib/Drupal.php, line 102

Class

Drupal
Static Service Container wrapper.

Code

protected static $container;

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.