You are here

public function Config::getState in Bamboo Twig 8.4

Same name and namespace in other branches
  1. 8.5 bamboo_twig_config/src/TwigExtension/Config.php \Drupal\bamboo_twig_config\TwigExtension\Config::getState()
  2. 8.2 bamboo_twig_config/src/TwigExtension/Config.php \Drupal\bamboo_twig_config\TwigExtension\Config::getState()
  3. 8.3 bamboo_twig_config/src/TwigExtension/Config.php \Drupal\bamboo_twig_config\TwigExtension\Config::getState()

Load given State API configuration.

Parameters

string $key: The key of the data to retrieve.

Return value

mixed|null Returns the stored value for a given key, or NULL if no value exists.

File

bamboo_twig_config/src/TwigExtension/Config.php, line 67

Class

Config
Provides getter for configs drupal storage as Twig Extensions.

Namespace

Drupal\bamboo_twig_config\TwigExtension

Code

public function getState($key) {
  return $this
    ->getStateFactory()
    ->get($key);
}