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

Breadcrumb

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

function Drupal::keyValueExpirable

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 380

Class

Drupal
Static Service Container wrapper.

Code

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