trait YamlFormEntityOptionsTrait in YAML Form 8
Provides an 'entity_reference' with options trait.
Hierarchy
- trait \Drupal\yamlform\Plugin\YamlFormElement\YamlFormEntityOptionsTrait
File
- src/
Plugin/ YamlFormElement/ YamlFormEntityOptionsTrait.php, line 11
Namespace
Drupal\yamlform\Plugin\YamlFormElementView source
trait YamlFormEntityOptionsTrait {
/**
* {@inheritdoc}
*/
public function getDefaultProperties() {
$properties = parent::getDefaultProperties() + [
// Entity reference settings.
'target_type' => '',
'selection_handler' => '',
'selection_settings' => [],
];
unset($properties['options']);
return $properties;
}
/**
* {@inheritdoc}
*/
public function prepare(array &$element, YamlFormSubmissionInterface $yamlform_submission) {
YamlFormEntityTrait::setOptions($element);
parent::prepare($element, $yamlform_submission);
}
/**
* {@inheritdoc}
*/
protected function getElementSelectorInputsOptions(array $element) {
YamlFormEntityTrait::setOptions($element);
return parent::getElementSelectorInputsOptions($element);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
YamlFormEntityOptionsTrait:: |
public | function | ||
YamlFormEntityOptionsTrait:: |
protected | function | ||
YamlFormEntityOptionsTrait:: |
public | function |