State::__construct

State::__construct(KeyValueFactoryInterface $key_value_factory)

Constructs a State object.

Parameters

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

File

core/lib/Drupal/Core/State/State.php, line 32

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');
}
doc_Drupal
2016-10-29 09:43:57
Comments
Leave a Comment

Please login to continue.