You are here

protected function EntityReferenceDragDropWidget::availableOptionsToRenderableArray in Entity Reference Drag & Drop 8

Same name and namespace in other branches
  1. 2.x src/Plugin/Field/FieldWidget/EntityReferenceDragDropWidget.php \Drupal\entityreference_dragdrop\Plugin\Field\FieldWidget\EntityReferenceDragDropWidget::availableOptionsToRenderableArray()

Converts list of available options to renderable array.

Parameters

array $options:

$key:

Return value

array

1 call to EntityReferenceDragDropWidget::availableOptionsToRenderableArray()
EntityReferenceDragDropWidget::formElement in src/Plugin/Field/FieldWidget/EntityReferenceDragDropWidget.php
Returns the form for a single field widget.

File

src/Plugin/Field/FieldWidget/EntityReferenceDragDropWidget.php, line 315

Class

EntityReferenceDragDropWidget
Plugin implementation of the 'entityreference_dragdrop' widget.

Namespace

Drupal\entityreference_dragdrop\Plugin\Field\FieldWidget

Code

protected function availableOptionsToRenderableArray(array $options, $key) {
  return $this
    ->optionsToRenderableArray($options, $key, $this
    ->getSetting('available_entities_label'), [
    'entityreference-dragdrop-available',
  ], [
    'entityreference-dragdrop-container-available',
  ]);
}