示例#1
0
 /**
  * Set step
  *
  * @param \Innova\PathBundle\Entity\Step $step
  *
  * @return StepCondition
  */
 public function setStep(\Innova\PathBundle\Entity\Step $step = null)
 {
     if ($step !== $this->step) {
         $this->step = $step;
         if (null !== $step) {
             $step->setCondition($this);
         }
     }
     return $this;
 }
 /**
  * Clean conditions data which no long exist in the current path
  *
  * @param array $neededCondition
  * @param array $existingCondition
  * @param Step $step
  * @return PublishingManager
  */
 protected function cleanCondition($neededCondition = null, $existingCondition = null, Step $step)
 {
     //echo "inside cleanCondition<br>\n";
     //echo "typeof(existingData)";var_dump(is_object($existingCondition));//echo "<br>\ntypeof(neededData)";var_dump(is_object($neededCondition));
     if ($existingCondition->getId() != $neededCondition->getId()) {
         $step->setCondition(null);
         $this->om->remove($neededCondition);
     }
     return $this;
 }