You are here

public function ParagraphsItemController::addPageTitle in Paragraphs table 8

The _title_callback for the paragraphs_item.add route.

Parameters

\Drupal\paragraphs\Entity\Paragraph $paragraph: The current paragraphs_item.

Return value

string The page title.

1 string reference to 'ParagraphsItemController::addPageTitle'
paragraphs_table.routing.yml in ./paragraphs_table.routing.yml
paragraphs_table.routing.yml

File

src/Controller/ParagraphsItemController.php, line 53

Class

ParagraphsItemController
Returns responses for paragraphs item routes.

Namespace

Drupal\paragraphs_table\Controller

Code

public function addPageTitle(Paragraph $paragraph) {
  return $this
    ->t('Create @label', [
    '@label' => $paragraph
      ->label(),
  ]);
}