Example #1
0
 /**
  * @param $stepsData
  * @return Step[]
  */
 public function createSteps($stepsData)
 {
     $steps = array();
     foreach ($stepsData as $entityData) {
         if ($entityData['action']) {
             $stepEntity = new Step();
             $stepEntity->setAction($entityData['action']);
             $stepEntity->setEstimatedTime($entityData['estimatedTime']);
             $this->stepManager->persistStep($stepEntity);
             $steps[] = $stepEntity;
         }
     }
     $this->stepManager->saveChanges();
     return $steps;
 }
Example #2
0
 /**
  * @param Step $step
  */
 function __construct(Step $step)
 {
     $this->id = $step->getId();
     $this->action = $step->getAction();
     $this->estimatedTime = $step->getEstimatedTime();
 }