Drupal::logger

public static Drupal::logger($channel) Returns a channel logger object. Parameters string $channel: The name of the channel. Can be any string, but the general practice is to use the name of the subsystem calling this. Return value \Psr\Log\LoggerInterface The logger for this channel. File core/lib/Drupal.php, line 671 Contains \Drupal. Class Drupal Static Service Container wrapper. Code public static function logger($channel) { return static::getContainer()->get('logger.factory')-

Drupal::lock

public static Drupal::lock() Returns the locking layer instance. Return value \Drupal\Core\Lock\LockBackendInterface Related topics Locking mechanisms Functions to coordinate long-running operations across requests. File core/lib/Drupal.php, line 322 Contains \Drupal. Class Drupal Static Service Container wrapper. Code public static function lock() { return static::getContainer()->get('lock'); }

Drupal::linkGenerator

public static Drupal::linkGenerator() Returns the link generator service. Return value \Drupal\Core\Utility\LinkGeneratorInterface File core/lib/Drupal.php, line 551 Contains \Drupal. Class Drupal Static Service Container wrapper. Code public static function linkGenerator() { return static::getContainer()->get('link_generator'); }

Drupal::languageManager

public static Drupal::languageManager() Returns the language manager service. Return value \Drupal\Core\Language\LanguageManagerInterface The language manager. File core/lib/Drupal.php, line 601 Contains \Drupal. Class Drupal Static Service Container wrapper. Code public static function languageManager() { return static::getContainer()->get('language_manager'); }

Drupal::l

public static Drupal::l($text, Url $url) Renders a link with a given link text and Url object. This method is a convenience wrapper for the link generator service's generate() method. For detailed documentation, see \Drupal\Core\Routing\LinkGeneratorInterface::generate(). Parameters string $text: The link text for the anchor tag. \Drupal\Core\Url $url: The URL object used for the link. Return value \Drupal\Core\GeneratedLink A GeneratedLink object containing a link to the given route and para

Drupal::keyValueExpirable

public static Drupal::keyValueExpirable($collection) Returns an expirable key value store collection. Parameters string $collection: The name of the collection holding key and value pairs. Return value \Drupal\Core\KeyValueStore\KeyValueStoreExpirableInterface An expirable key value store collection. File core/lib/Drupal.php, line 311 Contains \Drupal. Class Drupal Static Service Container wrapper. Code public static function keyValueExpirable($collection) { return static::getContaine

Drupal::keyValue

public static Drupal::keyValue($collection) Returns a key/value storage collection. Parameters string $collection: Name of the key/value collection to return. Return value \Drupal\Core\KeyValueStore\KeyValueStoreInterface File core/lib/Drupal.php, line 393 Contains \Drupal. Class Drupal Static Service Container wrapper. Code public static function keyValue($collection) { return static::getContainer()->get('keyvalue')->get($collection); }

Drupal::isConfigSyncing

public static Drupal::isConfigSyncing() Gets the syncing state. Return value bool Returns TRUE is syncing flag set. File core/lib/Drupal.php, line 657 Contains \Drupal. Class Drupal Static Service Container wrapper. Code public static function isConfigSyncing() { return static::getContainer()->get('config.installer')->isSyncing(); }

Drupal::httpClient

public static Drupal::httpClient() Returns the default http client. Return value \GuzzleHttp\Client A guzzle http client instance. File core/lib/Drupal.php, line 418 Contains \Drupal. Class Drupal Static Service Container wrapper. Code public static function httpClient() { return static::getContainer()->get('http_client'); }

Drupal::hasService

public static Drupal::hasService($id) Indicates if a service is defined in the container. Parameters string $id: The ID of the service to check. Return value bool TRUE if the specified service exists, FALSE otherwise. File core/lib/Drupal.php, line 170 Contains \Drupal. Class Drupal Static Service Container wrapper. Code public static function hasService($id) { // Check hasContainer() first in order to always return a Boolean. return static::hasContainer() && static::getCont