public function YamlFormHandlerBase::setConfiguration in YAML Form 8
Sets the configuration for this plugin instance.
Parameters
array $configuration: An associative array containing the plugin's configuration.
Overrides ConfigurablePluginInterface::setConfiguration
1 call to YamlFormHandlerBase::setConfiguration()
- YamlFormHandlerBase::__construct in src/
YamlFormHandlerBase.php - Constructs a \Drupal\Component\Plugin\PluginBase object.
File
- src/
YamlFormHandlerBase.php, line 236
Class
- YamlFormHandlerBase
- Provides a base class for a form handler.
Namespace
Drupal\yamlformCode
public function setConfiguration(array $configuration) {
$configuration += [
'handler_id' => '',
'label' => '',
'status' => 1,
'weight' => '',
'settings' => [],
];
$this->configuration = $configuration['settings'] + $this
->defaultConfiguration();
$this->handler_id = $configuration['handler_id'];
$this->label = $configuration['label'];
$this->weight = $configuration['weight'];
$this->status = $configuration['status'];
return $this;
}