You are here

public static function Drupal::keyValue in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal.php \Drupal::keyValue()

Returns a key/value storage collection.

Parameters

string $collection: Name of the key/value collection to return.

Return value

\Drupal\Core\KeyValueStore\KeyValueStoreInterface

10 calls to Drupal::keyValue()
DrupalTest::testKeyValue in core/tests/Drupal/Tests/Core/DrupalTest.php
Tests the keyValue() method.
EntityAutocomplete::processEntityAutocomplete in core/lib/Drupal/Core/Entity/Element/EntityAutocomplete.php
Adds entity autocomplete functionality to a form element.
EntitySchemaTest::testCleanUpStorageDefinition in core/modules/system/src/Tests/Entity/EntitySchemaTest.php
Tests fields from an uninstalled module are removed from the schema.
InstallTest::testRequiredModuleSchemaVersions in core/modules/system/src/Tests/Module/InstallTest.php
Tests recorded schema versions of early installed modules in the installer.
InstallTest::testUninstallPostUpdateFunctions in core/modules/system/src/Tests/Module/InstallTest.php
Ensures that post update functions are removed on uninstall.

... See full list

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);
}