public function LogicalOr::process in Business Rules 8
Same name and namespace in other branches
- 2.x src/Plugin/BusinessRulesCondition/LogicalOr.php \Drupal\business_rules\Plugin\BusinessRulesCondition\LogicalOr::process()
Process the condition.
Parameters
\Drupal\business_rules\ConditionInterface $condition: The configured condition.
\Drupal\business_rules\Events\BusinessRulesEvent $event: The event that has triggered the condition.
Return value
bool Boolean value that indicates if the condition is true.
Overrides BusinessRulesConditionPlugin::process
File
- src/
Plugin/ BusinessRulesCondition/ LogicalOr.php, line 38
Class
- LogicalOr
- Class LogicalOr.
Namespace
Drupal\business_rules\Plugin\BusinessRulesConditionCode
public function process(ConditionInterface $condition, BusinessRulesEvent $event) {
$items = $condition
->getSettings('items');
$items = BusinessRulesItemObject::itemsArrayToItemsObject($items);
/** @var \Drupal\business_rules\BusinessRulesItemObject $item */
foreach ($items as $item) {
$c = Condition::load($item
->getId());
if ($this->processor
->isConditionValid($c, $event)) {
return TRUE;
}
}
return FALSE;
}