You are here

private function WidgetBase::selectElementTypeOptions in Select (or other) 8

Same name and namespace in other branches
  1. 4.x src/Plugin/Field/FieldWidget/WidgetBase.php \Drupal\select_or_other\Plugin\Field\FieldWidget\WidgetBase::selectElementTypeOptions()

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 WidgetBase::selectElementTypeOptions()
WidgetBase::settingsForm in src/Plugin/Field/FieldWidget/WidgetBase.php
Returns a form to configure settings for the widget.
WidgetBase::settingsSummary in src/Plugin/Field/FieldWidget/WidgetBase.php
Returns a short summary for the current widget settings.

File

src/Plugin/Field/FieldWidget/WidgetBase.php, line 255

Class

WidgetBase
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('Check boxes/radio buttons'),
  ];
}