public function BusinessRule::addItem in Business Rules 8
Same name and namespace in other branches
- 2.x src/Entity/BusinessRule.php \Drupal\business_rules\Entity\BusinessRule::addItem()
Add one item on the Business Rule's items.
Parameters
\Drupal\business_rules\BusinessRulesItemObject $item: The item to be added.
Overrides BusinessRuleInterface::addItem
File
- src/
Entity/ BusinessRule.php, line 331
Class
- BusinessRule
- Defines the Rule entity.
Namespace
Drupal\business_rules\EntityCode
public function addItem(BusinessRulesItemObject $item) {
$item_array = $item
->toArray();
$this->items[$item
->getId()] = $item_array[$item
->getId()];
}