You are here

protected function ParagraphViewModeWidget::getDefaultOption in Paragraph View Mode 8

Same name and namespace in other branches
  1. 2.x src/Plugin/Field/FieldWidget/ParagraphViewModeWidget.php \Drupal\paragraph_view_mode\Plugin\Field\FieldWidget\ParagraphViewModeWidget::getDefaultOption()

Provides default option for the form elements.

Return value

array Default view mode option.

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

File

src/Plugin/Field/FieldWidget/ParagraphViewModeWidget.php, line 207

Class

ParagraphViewModeWidget
Plugin implementation of the 'paragraph_view_mode' widget.

Namespace

Drupal\paragraph_view_mode\Plugin\Field\FieldWidget

Code

protected function getDefaultOption() {
  return [
    ViewModeInterface::DEFAULT => $this
      ->t('Default'),
  ];
}