Drupal::$container

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

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

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

File

core/lib/Drupal.php, line 141

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.