public function ListUsageController::getTitle in Entity Usage 8.4
Same name and namespace in other branches
- 8 src/Controller/ListUsageController.php \Drupal\entity_usage\Controller\ListUsageController::getTitle()
- 8.2 src/Controller/ListUsageController.php \Drupal\entity_usage\Controller\ListUsageController::getTitle()
- 8.3 src/Controller/ListUsageController.php \Drupal\entity_usage\Controller\ListUsageController::getTitle()
Title page callback.
Parameters
string $entity_type: The entity type.
int $entity_id: The entity id.
Return value
string The title to be used on this page.
1 call to ListUsageController::getTitle()
- LocalTaskUsageController::getTitleLocalTask in src/
Controller/ LocalTaskUsageController.php - Title page callback.
1 string reference to 'ListUsageController::getTitle'
File
- src/
Controller/ ListUsageController.php, line 276
Class
- ListUsageController
- Controller for our pages.
Namespace
Drupal\entity_usage\ControllerCode
public function getTitle($entity_type, $entity_id) {
$entity = $this->entityTypeManager
->getStorage($entity_type)
->load($entity_id);
if ($entity) {
return $this
->t('Entity usage information for %entity_label', [
'%entity_label' => $entity
->label(),
]);
}
return $this
->t('Entity Usage List');
}