You are here

InlineParagraphsBrowserPreviewerWidget.php in Paragraphs Browser+Previewer 8

File

src/Plugin/Field/FieldWidget/InlineParagraphsBrowserPreviewerWidget.php
View source
<?php

namespace Drupal\paragraphs_browser_previewer\Plugin\Field\FieldWidget;

use Drupal\paragraphs\Plugin\Field\FieldWidget\InlineParagraphsWidget;
use Drupal\paragraphs_browser\Plugin\Field\FieldWidget\ParagraphsBrowserWidgetTrait;
use Drupal\paragraphs_previewer\Plugin\Field\FieldWidget\ParagraphsPreviewerWidgetTrait;

/**
 * Plugin implementation of the 'entity_reference paragraphs' widget.
 *
 * We hide add / remove buttons when translating to avoid accidental loss of
 * data because these actions effect all languages.
 *
 * @FieldWidget(
 *   id = "entity_reference_paragraphs_browser_previewer",
 *   label = @Translation("Paragraphs Browser Previewer Classic"),
 *   description = @Translation("An paragraphs inline form widget with a Browser Previewer."),
 *   field_types = {
 *     "entity_reference_revisions"
 *   }
 * )
 */
class InlineParagraphsBrowserPreviewerWidget extends InlineParagraphsWidget {
  use ParagraphsPreviewerWidgetTrait, ParagraphsBrowserWidgetTrait {
    ParagraphsBrowserWidgetTrait::defaultSettings insteadof ParagraphsPreviewerWidgetTrait;
    ParagraphsBrowserWidgetTrait::formMultipleElements insteadof ParagraphsPreviewerWidgetTrait;
    ParagraphsPreviewerWidgetTrait::formElement insteadof ParagraphsBrowserWidgetTrait;
  }

}

Classes

Namesort descending Description
InlineParagraphsBrowserPreviewerWidget Plugin implementation of the 'entity_reference paragraphs' widget.