You are here

public function BusinessRule::getTargetEntityTypeLabel in Business Rules 8

Same name and namespace in other branches
  1. 2.x src/Entity/BusinessRule.php \Drupal\business_rules\Entity\BusinessRule::getTargetEntityTypeLabel()

The label of the entity type id which this rule is applicable.

Context: The rule target entity type label.

Overrides BusinessRuleInterface::getTargetEntityTypeLabel

File

src/Entity/BusinessRule.php, line 428

Class

BusinessRule
Defines the Rule entity.

Namespace

Drupal\business_rules\Entity

Code

public function getTargetEntityTypeLabel() {
  $entities = $this->util
    ->getEntityTypes();
  foreach ($entities as $key => $value) {
    if ($key == $this
      ->getTargetEntityType()) {
      return $value;
    }
  }
  return '';
}