public function Details::getElementSelectorOptions in YAML Form 8
Get an element's selectors as options.
Parameters
array $element: An element.
Return value
array An array of element selectors.
Overrides ContainerBase::getElementSelectorOptions
File
- src/
Plugin/ YamlFormElement/ Details.php, line 43
Class
- Details
- Provides a 'details' element.
Namespace
Drupal\yamlform\Plugin\YamlFormElementCode
public function getElementSelectorOptions(array $element) {
$title = $this
->getAdminLabel($element);
$name = $element['#yamlform_key'];
return [
"details[data-yamlform-key=\"{$name}\"]" => $title . ' [' . $this
->getPluginLabel() . ']',
];
}