You are here

protected function TextFormat::getElementSelectorInputsOptions in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/Plugin/WebformElement/TextFormat.php \Drupal\webform\Plugin\WebformElement\TextFormat::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 WebformElementBase::getElementSelectorInputsOptions

File

src/Plugin/WebformElement/TextFormat.php, line 284

Class

TextFormat
Provides a 'text_format' element.

Namespace

Drupal\webform\Plugin\WebformElement

Code

protected function getElementSelectorInputsOptions(array $element) {
  $title = $this
    ->getAdminLabel($element);
  return [
    'value' => $title . ' [' . $this
      ->t('Textarea') . ']',
    'format' => $title . ' [' . $this
      ->t('Select') . ']',
  ];
}