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