ezcWorkflowNode::addInNode PHP Method

addInNode() public method

Automatically adds $node to the workflow and adds this node as an out node of $node.
public addInNode ( ezcWorkflowNode $node ) : ezcWorkflowNode
$node ezcWorkflowNode The node that is to be added as incoming node.
return ezcWorkflowNode
    public function addInNode(ezcWorkflowNode $node)
    {
        // Check whether the node is already an incoming node of this node.
        if (ezcWorkflowUtil::findObject($this->inNodes, $node) === false) {
            // Add this node as an outgoing node to the other node.
            if (!self::$internalCall) {
                self::$internalCall = true;
                $node->addOutNode($this);
            } else {
                self::$internalCall = false;
            }
            // Add the other node as an incoming node to this node.
            $this->inNodes[] = $node;
            $this->numInNodes++;
        }
        return $this;
    }