public function Asset::getBundleLabel in farmOS 2.x
Gets the label of the the asset type.
Return value
string The label of the asset type.
Overrides AssetInterface::getBundleLabel
File
- modules/
core/ asset/ src/ Entity/ Asset.php, line 149
Class
- Asset
- Defines the asset entity.
Namespace
Drupal\asset\EntityCode
public function getBundleLabel() {
/** @var \Drupal\asset\Entity\AssetTypeInterface $type */
$type = \Drupal::entityTypeManager()
->getStorage('asset_type')
->load($this
->bundle());
return $type
->label();
}