You are here

public function Details::getElementSelectorOptions in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/Plugin/WebformElement/Details.php \Drupal\webform\Plugin\WebformElement\Details::getElementSelectorOptions()

Get an element's selectors as options.

Parameters

array $element: An element.

Return value

array An array of element selectors.

Overrides ContainerBase::getElementSelectorOptions

See also

\Drupal\webform\Entity\Webform::getElementsSelectorSourceOption

1 method overrides Details::getElementSelectorOptions()
WebformWizardPage::getElementSelectorOptions in src/Plugin/WebformElement/WebformWizardPage.php
Get an element's selectors as options.

File

src/Plugin/WebformElement/Details.php, line 65

Class

Details
Provides a 'details' element.

Namespace

Drupal\webform\Plugin\WebformElement

Code

public function getElementSelectorOptions(array $element) {
  $title = $this
    ->getAdminLabel($element);
  $name = $element['#webform_key'];
  return [
    "details[data-webform-key=\"{$name}\"]" => $title . '  [' . $this
      ->getPluginLabel() . ']',
  ];
}