You are here

public function ParagraphsPreviewerWidgetTrait::isPreviewerEnabled in Paragraphs Previewer 8

Determine if the previewer is enabled for the given paragraphs edit mode.

Parameters

string $mode: The paragraphs edit mode.

Return value

bool TRUE if the previewer is enabled.

1 call to ParagraphsPreviewerWidgetTrait::isPreviewerEnabled()
ParagraphsPreviewerWidgetTrait::formElement in src/Plugin/Field/FieldWidget/ParagraphsPreviewerWidgetTrait.php
Uses a similar approach to populate a new translation.

File

src/Plugin/Field/FieldWidget/ParagraphsPreviewerWidgetTrait.php, line 43

Class

ParagraphsPreviewerWidgetTrait
Paragraphs previewer trait to support multiple paragraphs widgets.

Namespace

Drupal\paragraphs_previewer\Plugin\Field\FieldWidget

Code

public function isPreviewerEnabled($mode) {
  return $mode != 'removed' && $mode != 'remove';
}