public function ParagraphsBehaviorInterface::view in Paragraphs 8
Extends the paragraph render array with behavior.
Parameters
array &$build: A renderable array representing the paragraph. The module may add elements to $build prior to rendering. The structure of $build is a renderable array as expected by drupal_render().
\Drupal\paragraphs\Entity\Paragraph $paragraph: The paragraph.
\Drupal\Core\Entity\Display\EntityViewDisplayInterface $display: The entity view display holding the display options configured for the entity components.
string $view_mode: The view mode the entity is rendered in.
Return value
array A render array provided by the plugin.
4 methods override ParagraphsBehaviorInterface::view()
- TestBoldTextBehavior::view in tests/
modules/ paragraphs_test/ src/ Plugin/ paragraphs/ Behavior/ TestBoldTextBehavior.php - Extends the paragraph render array with behavior.
- TestDummyBehavior::view in tests/
modules/ paragraphs_test/ src/ Plugin/ paragraphs/ Behavior/ TestDummyBehavior.php - Extends the paragraph render array with behavior.
- TestFieldsSelectionBehavior::view in tests/
modules/ paragraphs_test/ src/ Plugin/ paragraphs/ Behavior/ TestFieldsSelectionBehavior.php - Extends the paragraph render array with behavior.
- TestTextColorBehavior::view in tests/
modules/ paragraphs_test/ src/ Plugin/ paragraphs/ Behavior/ TestTextColorBehavior.php - Extends the paragraph render array with behavior.
File
- src/
ParagraphsBehaviorInterface.php, line 102
Class
- ParagraphsBehaviorInterface
- Provides an interface defining a paragraph behavior.
Namespace
Drupal\paragraphsCode
public function view(array &$build, Paragraph $paragraph, EntityViewDisplayInterface $display, $view_mode);