public static function MediaBundle::getLabel in Media entity 8
Returns the label.
Parameters
\Drupal\media_entity\MediaInterface $media: The Media entity.
Return value
string|bool Returns the label of the bundle that entity belongs to.
Overrides MediaBundleInterface::getLabel
File
- src/
Entity/ MediaBundle.php, line 147
Class
- MediaBundle
- Defines the Media bundle configuration entity.
Namespace
Drupal\media_entity\EntityCode
public static function getLabel(MediaInterface $media) {
$bundle = static::load($media
->bundle());
return $bundle ? $bundle
->label() : FALSE;
}