You are here

public static function TwigTweakExtension::drupalConfig in Twig Tweak 3.1.x

Same name and namespace in other branches
  1. 3.x src/TwigTweakExtension.php \Drupal\twig_tweak\TwigTweakExtension::drupalConfig()

Retrieves data from a given configuration object.

Parameters

string $name: The name of the configuration object to construct.

string $key: A string that maps to a key within the configuration data.

Return value

mixed The data that was requested.

File

src/TwigTweakExtension.php, line 291

Class

TwigTweakExtension
Twig extension with some useful functions and filters.

Namespace

Drupal\twig_tweak

Code

public static function drupalConfig(string $name, string $key) {
  return \Drupal::config($name)
    ->get($key);
}