public function BlockStyle::defaultConfiguration in Block Style Plugins 8
Same name and namespace in other branches
- 8.2 src/Plugin/BlockStyle.php \Drupal\block_style_plugins\Plugin\BlockStyle::defaultConfiguration()
Gets default configuration for this plugin.
Return value
array An associative array with the default configuration.
Overrides BlockStyleBase::defaultConfiguration
File
- src/
Plugin/ BlockStyle.php, line 15
Class
- BlockStyle
- Provides a default class for block styles declared by yaml.
Namespace
Drupal\block_style_plugins\PluginCode
public function defaultConfiguration() {
$defaults = [];
if (isset($this->pluginDefinition['form'])) {
foreach ($this->pluginDefinition['form'] as $field => $setting) {
if (isset($setting['#default_value'])) {
$defaults[$field] = $setting['#default_value'];
}
}
}
return $defaults;
}