You are here

function State::__construct in Service Container 7

Same name and namespace in other branches
  1. 7.2 lib/Drupal/Core/State/State.php \Drupal\Core\State\State::__construct()

Constructs a State object.

Parameters

\Drupal\Core\KeyValueStore\KeyValueFactoryInterface $key_value_factory: The key value store to use.

File

lib/Drupal/Core/State/State.php, line 37
Contains \Drupal\Core\State\State.

Class

State
Provides the state system using a key value store.

Namespace

Drupal\Core\State

Code

function __construct(KeyValueFactoryInterface $key_value_factory) {
  $this->keyValueStore = $key_value_factory
    ->get('state');
}