public function ParagraphsItemController::pageTitle in Paragraphs table 8
The _title_callback for the paragraphs_item.view route.
Parameters
\Drupal\paragraphs\Entity\Paragraph $paragraph: The current paragraphs_item.
Return value
string The page title.
1 string reference to 'ParagraphsItemController::pageTitle'
File
- src/
Controller/ ParagraphsItemController.php, line 79
Class
- ParagraphsItemController
- Returns responses for paragraphs item routes.
Namespace
Drupal\paragraphs_table\ControllerCode
public function pageTitle(Paragraph $paragraph = NULL) {
return \Drupal::service('entity.repository')
->getTranslationFromContext($paragraph)
->label() . ' #' . $paragraph
->id();
}