Beispiel #1
0
 /**
  * Add node
  *
  * @param NodeInterface $node
  *
  * @return Workflow
  */
 public function addNode(NodeInterface $node)
 {
     //add a 'creation-node' to every workflow
     if (count($this->getNodes()) == 0) {
         $creationNode = new Node();
         $creationNode->setName('creation');
         $creationNode->setEnd(false);
         $creationNode->setStart(true);
         $creationNode->setWorkflow($this);
         $this->nodes[] = $creationNode;
     }
     $this->nodes[] = $node;
     $node->setWorkflow($this);
     return $this;
 }
Beispiel #2
0
 /**
  * Get nodeNameTo
  *
  * @return string
  */
 public function getNodeNameTo()
 {
     return $this->nodeTo->getName();
 }