public function BusinessRulesItemObject::loadEntity in Business Rules 8
Same name and namespace in other branches
- 2.x src/BusinessRulesItemObject.php \Drupal\business_rules\BusinessRulesItemObject::loadEntity()
Load the Item object. Action or Condition.
Return value
\Drupal\business_rules\ItemInterface|null The loaded item. Action or Condition.
File
- src/
BusinessRulesItemObject.php, line 89
Class
- BusinessRulesItemObject
- Class BusinessRulesItemObject.
Namespace
Drupal\business_rulesCode
public function loadEntity() {
if ($this
->getType() == self::ACTION) {
return Action::load($this
->getId());
}
elseif ($this
->getType() == self::CONDITION) {
return Condition::load($this
->getId());
}
return NULL;
}