Same name in other branches
- 8.x-2.x src/FieldStateBase.php \Drupal\field_states_ui\FieldStateBase::setConfiguration()
2 calls to FieldStateBase::setConfiguration()
Fichier
-
src/
FieldStateBase.php, line 127
Classe
- FieldStateBase
- Provides a base class for field staes.
Namespace
Drupal\field_states_uiCode
public function setConfiguration(array $configuration) {
$configuration += [
'data' => [],
'uuid' => '',
];
$this->configuration = $configuration['data'] + $this->defaultConfiguration();
if (!$this->configuration['value']) {
$this->configuration['value'] = TRUE;
}
$this->uuid = $configuration['uuid'] ? $configuration['uuid'] : \Drupal::service('uuid')->generate();
return $this;
}