Skip to main content

State API

DrevOps\BehatSteps\Steps\Drupal\StateTrait - Source, Steps

Manage and assert Drupal State API values with automatic revert.

public function stateExists(string $name): bool

Determine whether a state key exists, a key holding NULL included

public function stateFindValue(string $name): mixed

Find a state value

public function stateSetValue(string $name, mixed $value): void

Set a state value, restored after the scenario