You are here

public function ParagraphsViewmodeBehaviorInterface::entityViewModeAlter in Paragraphs View Modes 8

Allow plugin to alter the paragraph view mode.

Parameters

string $view_mode: The current view mode.

\Drupal\paragraphs\ParagraphInterface $paragraph: The paragraph.

array $context: Additional context information.

Return value

mixed The new view mode.

1 method overrides ParagraphsViewmodeBehaviorInterface::entityViewModeAlter()
ParagraphsViewmodeBehavior::entityViewModeAlter in src/Plugin/paragraphs/Behavior/ParagraphsViewmodeBehavior.php
Allow plugin to alter the paragraph view mode.

File

src/ParagraphsViewmodeBehaviorInterface.php, line 26

Class

ParagraphsViewmodeBehaviorInterface
Interface ParagraphsViewmodeBehaviorInterface.

Namespace

Drupal\paragraphs_viewmode

Code

public function entityViewModeAlter(&$view_mode, ParagraphInterface $paragraph, array $context);