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

Breadcrumb

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

function State::__construct

Same name in this branch
  1. 11.1.x core/modules/workflows/src/State.php \Drupal\workflows\State::__construct()

Constructs a State object.

Parameters

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

\Drupal\Core\Cache\CacheBackendInterface $cache: The cache backend.

\Drupal\Core\Lock\LockBackendInterface $lock: The lock backend.

Overrides CacheCollector::__construct

File

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

Class

State
Provides the state system using a key value store.

Namespace

Drupal\Core\State

Code

public function __construct(KeyValueFactoryInterface $key_value_factory, CacheBackendInterface $cache, LockBackendInterface $lock) {
    parent::__construct('state', $cache, $lock);
    $this->keyValueStore = $key_value_factory->get('state');
}
RSS feed
Powered by Drupal