public function TwigExtension::drupalConfig in Twig Tweak 8.2
Same name and namespace in other branches
- 8 src/TwigExtension.php \Drupal\twig_tweak\TwigExtension::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/
TwigExtension.php, line 862
Class
- TwigExtension
- Twig extension with some useful functions and filters.
Namespace
Drupal\twig_tweakCode
public function drupalConfig($name, $key) {
return \Drupal::config($name)
->get($key);
}