public function FieldCollectionItemController::pageTitle in Field collection 8
Same name and namespace in other branches
- 8.3 src/Controller/FieldCollectionItemController.php \Drupal\field_collection\Controller\FieldCollectionItemController::pageTitle()
The _title_callback for the field_collection_item.view route.
Parameters
FieldCollectionItem $field_collection_item: The current field_collection_item.
Return value
string The page title.
1 string reference to 'FieldCollectionItemController::pageTitle'
File
- src/
Controller/ FieldCollectionItemController.php, line 92
Class
- FieldCollectionItemController
- Returns responses for Field collection item routes.
Namespace
Drupal\field_collection\ControllerCode
public function pageTitle(FieldCollectionItem $field_collection_item) {
return \Drupal::service('entity.repository')
->getTranslationFromContext($field_collection_item)
->label();
}