You are here

public function Plan::getBundleLabel in farmOS 2.x

Gets the label of the the plan type.

Return value

string The label of the plan type.

Overrides PlanInterface::getBundleLabel

File

modules/core/plan/src/Entity/Plan.php, line 149

Class

Plan
Defines the plan entity.

Namespace

Drupal\plan\Entity

Code

public function getBundleLabel() {

  /** @var \Drupal\plan\Entity\PlanTypeInterface $type */
  $type = \Drupal::entityTypeManager()
    ->getStorage('plan_type')
    ->load($this
    ->bundle());
  return $type
    ->label();
}