Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Drupal.php

function 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

5 calls to Drupal::keyValue()
EntityAutocomplete::processEntityAutocomplete in core/lib/Drupal/Core/Entity/Element/EntityAutocomplete.php
Adds entity autocomplete functionality to a form element.
SourcePluginBase::getHighWaterStorage in core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php
Get the high water storage object.
SqlContentEntityStorageSchema::installedStorageSchema in core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php
Gets the keyvalue collection for tracking the installed schema.
SqlContentEntityStorageSchema::updateBackupRepository in core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php
Gets the key/value collection for tracking the entity update backups.
system_requirements in core/modules/system/system.install
Implements hook_requirements().

File

core/lib/Drupal.php, line 465

Class

Drupal
Static Service Container wrapper.

Code

public static function keyValue($collection) {
    return static::getContainer()->get('keyvalue')
        ->get($collection);
}
RSS feed
Powered by Drupal