You are here

protected function ParagraphsItemController::buildPage in Paragraphs table 8

Builds a paragraph item page render array.

Parameters

\Drupal\paragraphs\Entity\Paragraph $paragraph: The field paragraph item we are displaying.

Return value

array An array suitable for drupal_render().

1 call to ParagraphsItemController::buildPage()
ParagraphsItemController::page in src/Controller/ParagraphsItemController.php
Displays a paragraphs item.

File

src/Controller/ParagraphsItemController.php, line 94

Class

ParagraphsItemController
Returns responses for paragraphs item routes.

Namespace

Drupal\paragraphs_table\Controller

Code

protected function buildPage(Paragraph $paragraph) {
  return [
    'paragraph' => $this
      ->entityTypeManager()
      ->getViewBuilder('paragraph')
      ->view($paragraph),
  ];
}