/** * Removes a node from the outgoing nodes of this node. * * Automatically removes $this as an in node of $node. * * @param ezcWorkflowNode $node The node that is to be removed as outgoing node. * @throws ezcWorkflowInvalidWorkflowException if the operation violates the constraints of the nodes involved. * @return boolean */ public function removeOutNode(ezcWorkflowNode $node) { $index = ezcWorkflowUtil::findObject($this->outNodes, $node); if ($index !== false) { // Remove this node as an incoming node from the other node. if (!self::$internalCall) { self::$internalCall = true; $node->removeInNode($this); } else { self::$internalCall = false; } unset($this->outNodes[$index]); $this->numOutNodes--; return true; } return false; }