function Typography::setConfiguration
Same name and namespace in other branches
- main core/lib/Drupal/Core/Theme/Plugin/DesignTokenValue/Typography.php \Drupal\Core\Theme\Plugin\DesignTokenValue\Typography::setConfiguration()
Sets the configuration for this plugin instance.
The provided configuration is merged with the plugin's default configuration. If the same configuration key exists in both configurations, then the value in the provided configuration will override the default.
Parameters
array $configuration: An associative array containing the plugin's configuration.
Return value
$this
Overrides ConfigurableTrait::setConfiguration
File
-
core/
lib/ Drupal/ Core/ Theme/ Plugin/ DesignTokenValue/ Typography.php, line 92
Class
- Typography
- Typography design token value.
Namespace
Drupal\Core\Theme\Plugin\DesignTokenValueCode
public function setConfiguration(array $configuration) : static {
parent::setConfiguration($configuration);
foreach ($this->properties as $property => $type) {
$propertyConfig = static::prepareConfiguration($this->configuration[$property]);
$this->{$property} = $this->designTokenValuePluginManager
->createInstance($type, $propertyConfig);
}
return $this;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.