public function EdgeEntityTitleProvider::deleteTitle in Apigee Edge 8
Provides a generic delete title callback.
Parameters
\Drupal\Core\Routing\RouteMatchInterface $route_match: The route match.
\Drupal\Core\Entity\EntityInterface $_entity: (optional) An entity, passed in directly from the request attributes, and set in \Drupal\Core\Entity\Enhancer\EntityRouteEnhancer.
Return value
string The title for the entity delete page.
Overrides EntityController::deleteTitle
File
- src/
Entity/ EdgeEntityTitleProvider.php, line 61
Class
- EdgeEntityTitleProvider
- Provides default page titles for Apigee Edge entities.
Namespace
Drupal\apigee_edge\EntityCode
public function deleteTitle(RouteMatchInterface $route_match, EntityInterface $_entity = NULL) {
if ($entity = $this
->doGetEntity($route_match, $_entity)) {
// TODO Investigate why entity delete forms (confirm forms) does not
// display this as a page title. This issue also existed before.
return $this
->t('Delete %label @entity_type', [
'%label' => $entity
->label(),
'@entity_type' => mb_strtolower($this->entityTypeManager
->getDefinition($entity
->getEntityTypeId())
->getSingularLabel()),
]);
}
return parent::deleteTitle($route_match, $_entity);
}