protected function ContentEntitySource::getBundleLabel in Translation Management Tool 8
Returns the bundle label for a given entity type.
Parameters
\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type.
Return value
string The bundle label.
1 call to ContentEntitySource::getBundleLabel()
- ContentEntitySource::continuousSettingsForm in sources/
content/ src/ Plugin/ tmgmt/ Source/ ContentEntitySource.php - Creates "Continuous settings" form element.
File
- sources/
content/ src/ Plugin/ tmgmt/ Source/ ContentEntitySource.php, line 732
Class
- ContentEntitySource
- Content entity source plugin controller.
Namespace
Drupal\tmgmt_content\Plugin\tmgmt\SourceCode
protected function getBundleLabel(EntityTypeInterface $entity_type) {
if ($entity_type
->getBundleLabel()) {
return $entity_type
->getBundleLabel();
}
if ($entity_type
->getBundleEntityType()) {
return \Drupal::entityTypeManager()
->getDefinition($entity_type
->getBundleEntityType())
->getLabel();
}
return $this
->t('@label type', [
'@label' => $entity_type
->getLabel(),
]);
}