public function SynonymConfigController::overviewEntityTypeBundleTitle in Synonyms 8
Title callback for 'entity.synonym.overview.entity_type.bundle.behavior'.
1 string reference to 'SynonymConfigController::overviewEntityTypeBundleTitle'
File
- src/
Controller/ SynonymConfigController.php, line 136
Class
- SynonymConfigController
- Controller for admin UI of the module.
Namespace
Drupal\synonyms\ControllerCode
public function overviewEntityTypeBundleTitle(EntityTypeInterface $synonyms_entity_type, $bundle, SynonymsBehaviorInterface $synonyms_behavior_service) {
if ($synonyms_entity_type
->id() == $bundle) {
return $this
->t('Manage @behavior of @entity_type', [
'@behavior' => $synonyms_behavior_service
->getTitle(),
'@entity_type' => $synonyms_entity_type
->getLabel(),
]);
}
$bundle_info = $this->entityTypeBundleInfo
->getBundleInfo($synonyms_entity_type
->id());
return $this
->t('Manage @behavior of @entity_type @bundle', [
'@behavior' => $synonyms_behavior_service
->getTitle(),
'@entity_type' => $synonyms_entity_type
->getLabel(),
'@bundle' => $bundle_info[$bundle]['label'],
]);
}