public function EmbedButton::getTypeLabel in Embed 8
Returns the label of the associated embed type.
Return value
string Human readable label of the embed type.
Overrides EmbedButtonInterface::getTypeLabel
File
- src/
Entity/ EmbedButton.php, line 97
Class
- EmbedButton
- Defines the EmbedButton entity.
Namespace
Drupal\embed\EntityCode
public function getTypeLabel() {
if ($definition = $this
->embedTypeManager()
->getDefinition($this
->getTypeId(), FALSE)) {
return $definition['label'];
}
return $this
->t('Unknown');
}