You are here

public static function Drupal::keyValueExpirable in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal.php \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.

1 call to Drupal::keyValueExpirable()
DrupalTest::testKeyValueExpirable in core/tests/Drupal/Tests/Core/DrupalTest.php
Tests the keyValueExpirable() method.

File

core/lib/Drupal.php, line 311
Contains \Drupal.

Class

Drupal
Static Service Container wrapper.

Code

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