You are here

public function TwigExtension::drupalConfig in Twig Tweak 8

Same name and namespace in other branches
  1. 8.2 src/TwigExtension.php \Drupal\twig_tweak\TwigExtension::drupalConfig()

Gets data from this configuration.

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/TwigExtension.php, line 311

Class

TwigExtension
Twig extension with some useful functions and filters.

Namespace

Drupal\twig_tweak

Code

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