You are here

protected function YamlFormLikert::getElementSelectorInputsOptions in YAML Form 8

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 YamlFormElementBase::getElementSelectorInputsOptions

File

src/Plugin/YamlFormElement/YamlFormLikert.php, line 322

Class

YamlFormLikert
Provides a 'likert' element.

Namespace

Drupal\yamlform\Plugin\YamlFormElement

Code

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