Drupal::destination

public static Drupal::destination() Returns the redirect destination helper. Return value \Drupal\Core\Routing\RedirectDestinationInterface The redirect destination helper. File core/lib/Drupal.php, line 710 Contains \Drupal. Class Drupal Static Service Container wrapper. Code public static function destination() { return static::getContainer()->get('redirect.destination'); }

Drupal::database

public static Drupal::database() Returns the current primary database. Return value \Drupal\Core\Database\Connection The current active database's master connection. File core/lib/Drupal.php, line 282 Contains \Drupal. Class Drupal Static Service Container wrapper. Code public static function database() { return static::getContainer()->get('database'); }

Drupal::currentUser

public static Drupal::currentUser() Gets the current active user. Return value \Drupal\Core\Session\AccountProxyInterface File core/lib/Drupal.php, line 246 Contains \Drupal. Class Drupal Static Service Container wrapper. Code public static function currentUser() { return static::getContainer()->get('current_user'); }

Drupal::csrfToken

public static Drupal::csrfToken() Returns the CSRF token manager service. The generated token is based on the session ID of the current user. Normally, anonymous users do not have a session, so the generated token will be different on every page request. To generate a token for users without a session, manually start a session prior to calling this function. Return value \Drupal\Core\Access\CsrfTokenGenerator The CSRF token manager. See also \Drupal\Core\Session\SessionManager::start() File c

Drupal::CORE_MINIMUM_SCHEMA_VERSION

Core minimum schema version. File core/lib/Drupal.php, line 94 Contains \Drupal. Class Drupal Static Service Container wrapper. Code const CORE_MINIMUM_SCHEMA_VERSION = 8000;

Drupal::CORE_COMPATIBILITY

Core API compatibility. File core/lib/Drupal.php, line 89 Contains \Drupal. Class Drupal Static Service Container wrapper. Code const CORE_COMPATIBILITY = '8.x';

Drupal::configFactory

public static Drupal::configFactory() Retrieves the configuration factory. This is mostly used to change the override settings on the configuration factory. For example, changing the language, or turning all overrides on or off. Return value \Drupal\Core\Config\ConfigFactoryInterface The configuration factory service. File core/lib/Drupal.php, line 355 Contains \Drupal. Class Drupal Static Service Container wrapper. Code public static function configFactory() { return static::getContai

Drupal::config

public static Drupal::config($name) Retrieves a configuration object. This is the main entry point to the configuration API. Calling \Drupal::config('book.admin') will return a configuration object in which the book module can store its administrative settings. Parameters string $name: The name of the configuration object to retrieve. The name corresponds to a configuration file. For \Drupal::config('book.admin') , the config object returned will contain the contents of book.admin configura

Drupal::cache

public static Drupal::cache($bin = 'default') Returns the requested cache bin. Parameters string $bin: (optional) The cache bin for which the cache object should be returned, defaults to 'default'. Return value \Drupal\Core\Cache\CacheBackendInterface The cache object associated with the specified bin. Related topics Cache API Information about the Drupal Cache API File core/lib/Drupal.php, line 298 Contains \Drupal. Class Drupal Static Service Container wrapper. Code public static fu

Drupal::accessManager

public static Drupal::accessManager() Returns the access manager service. Return value \Drupal\Core\Access\AccessManagerInterface The access manager service. File core/lib/Drupal.php, line 700 Contains \Drupal. Class Drupal Static Service Container wrapper. Code public static function accessManager() { return static::getContainer()->get('access_manager'); }