You are here

public function BusinessRule::getTargetEntityTypeLabel in Business Rules 2.x

Same name and namespace in other branches
  1. 8 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 451

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 '';
}