You are here

protected function WebformToggles::getElementSelectorInputsOptions in Webform 6.x

Same name and namespace in other branches
  1. 8.5 modules/webform_toggles/src/Plugin/WebformElement/WebformToggles.php \Drupal\webform_toggles\Plugin\WebformElement\WebformToggles::getElementSelectorInputsOptions()

Get an element's (sub)inputs selectors as options.

Parameters

array $element: An element.

Return value

array An array of element (sub)input selectors.

Overrides OptionsBase::getElementSelectorInputsOptions

File

modules/webform_toggles/src/Plugin/WebformElement/WebformToggles.php, line 60

Class

WebformToggles
Provides a 'toggles' element.

Namespace

Drupal\webform_toggles\Plugin\WebformElement

Code

protected function getElementSelectorInputsOptions(array $element) {
  $selectors = $element['#options'];
  foreach ($selectors as &$text) {
    $text .= ' [' . $this
      ->t('Toggle') . ']';
  }
  return $selectors;
}