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