You are here

abstract protected function WidgetBase::getOptions in Select (or other) 4.x

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

Returns the array of options for the widget.

Parameters

\Drupal\Core\Entity\FieldableEntityInterface $entity: The entity this widget is used for.

Return value

array The array of available options for the widget. The array of available options for the widget.

2 calls to WidgetBase::getOptions()
WidgetBase::formElement in src/Plugin/Field/FieldWidget/WidgetBase.php
Returns the form for a single field widget.
WidgetBase::getSelectedOptions in src/Plugin/Field/FieldWidget/WidgetBase.php
Determines selected options from the incoming field values.
2 methods override WidgetBase::getOptions()
ListWidget::getOptions in src/Plugin/Field/FieldWidget/ListWidget.php
Returns the array of options for the widget.
ReferenceWidget::getOptions in src/Plugin/Field/FieldWidget/ReferenceWidget.php
Returns the array of options for the widget.

File

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

Class

WidgetBase
Base class for the 'select_or_other_*' widgets.

Namespace

Drupal\select_or_other\Plugin\Field\FieldWidget

Code

protected abstract function getOptions(FieldableEntityInterface $entity = NULL);