public function UIPatternsSettingsExtension::patternConfiguration in UI Patterns Settings 8.2
Returns pattern configuration.
Parameters
string $pattern_id: The pattern id.
string $variant_id: The variant id.
string $config_name: The config name.
Return value
mixed|null The pattern config
File
- src/
TwigExtension/ UIPatternsSettingsExtension.php, line 47
Class
- UIPatternsSettingsExtension
- UI Patterns Twig Extension.
Namespace
Drupal\ui_patterns_settings\TwigExtensionCode
public function patternConfiguration($pattern_id, $variant_id, $config_name) {
$definition = UiPatterns::getPatternDefinition($pattern_id);
if ($definition !== NULL) {
$configuration = UiPatternsSettings::getPatternConfiguration($definition, $variant_id);
return isset($configuration[$config_name]) ? $configuration[$config_name] : NULL;
}
}