/** * {@inheritdoc} */ public function isAllowed($context, Collection $errors = null) { if (!$this->condition) { $this->condition = $this->assembler->assemble($this->configuration); } return $this->condition->isAllowed($context, $errors); }
/** * @param mixed $context * @return bool */ protected function isAllowed($context) { if (!$this->condition) { return true; } return $this->condition->isAllowed($context); }
/** * Returns negation of embedded condition * * @param mixed $context * @param Collection|null $errors * @return boolean */ public function isAllowed($context, Collection $errors = null) { $isAllowed = !$this->condition->isAllowed($context, $errors); if (!$isAllowed) { $this->addError($context, $errors); } return $isAllowed; }
/** * Check is transition pre condition is allowed for current workflow item. * * @param WorkflowItem $workflowItem * @param Collection|null $errors * @return boolean */ protected function isPreConditionAllowed(WorkflowItem $workflowItem, Collection $errors = null) { if (!$this->preCondition) { return true; } return $this->preCondition->isAllowed($workflowItem, $errors); }