public function BusinessRule::getTargetEntityTypeLabel in Business Rules 2.x
Same name and namespace in other branches
- 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\EntityCode
public function getTargetEntityTypeLabel() {
$entities = $this->util
->getEntityTypes();
foreach ($entities as $key => $value) {
if ($key == $this
->getTargetEntityType()) {
return $value;
}
}
return '';
}