You are here

private function SelectOrOtherWidgetBase::selectElementTypeOptions in Select (or other) 8.3

Returns the types of select elements available for selection.

@codeCoverageIgnore Testing this method would only test if this hard-coded array equals the one in the test case.

Return value

array The available select element types.

2 calls to SelectOrOtherWidgetBase::selectElementTypeOptions()
SelectOrOtherWidgetBase::settingsForm in src/Plugin/Field/FieldWidget/SelectOrOtherWidgetBase.php
Returns a form to configure settings for the widget.
SelectOrOtherWidgetBase::settingsSummary in src/Plugin/Field/FieldWidget/SelectOrOtherWidgetBase.php
Returns a short summary for the current widget settings.

File

src/Plugin/Field/FieldWidget/SelectOrOtherWidgetBase.php, line 307
Contains \Drupal\select_or_other\Plugin\Field\FieldWidget\SelectOrOtherWidgetBase.

Class

SelectOrOtherWidgetBase
Base class for the 'select_or_other_*' widgets.

Namespace

Drupal\select_or_other\Plugin\Field\FieldWidget

Code

private function selectElementTypeOptions() {
  return [
    'select_or_other_select' => $this
      ->t('Select list'),
    'select_or_other_buttons' => $this
      ->t('Radiobuttons/checkboxes'),
  ];
}