plugin/path/Manager/PathManager.php
public function importStep(Path $path, array $data, array $createdResources = [], array $createdSteps = [])
    {
        $step = new Step();

        $step->setPath($path);
        if (!empty($data['parent'])) {
            $step->setParent($createdSteps[$data['parent']]);
        }

        $step->setOrder($data['order']);
        $step->setActivityHeight(0);

        // Link Step to its Activity
        if (!empty($data['activityNodeId']) && !empty($createdResources[$data['activityNodeId']])) {
            // Step has an Activity
            $step->setActivity($createdResources[$data['activityNodeId']]);
        }

        $createdSteps[$data['uid']] = $step;

        $this->om->persist($step);

        return $createdSteps;
    }
public function importStep(Path $path, array $data, array $createdResources = [], array $createdSteps = [])
    {
        $step = new Step();

        $step->setPath($path);
        if (!empty($data['parent'])) {
            $step->setParent($createdSteps[$data['parent']]);
        }

        $step->setOrder($data['order']);
        $step->setActivityHeight(0);

        // Link Step to its Activity
        if (!empty($data['activityNodeId']) && !empty($createdResources[$data['activityNodeId']])) {
            // Step has an Activity
            $step->setActivity($createdResources[$data['activityNodeId']]);
        }

        $createdSteps[$data['uid']] = $step;

        $this->om->persist($step);

        return $createdSteps;
    }
public function importStep ( Path $ path , array $ data , array $ createdResources = [ ] , array $ createdSteps = [ ] ) { $ step = new Step ( ) ; $ step -> setPath ( $ path ) ; if ( ! empty ( $ data [ 'parent' ] ) ) { $ step -> setParent ( $ createdSteps [ $ data [ 'parent' ] ] ) ; } $ step -> setOrder ( $ data [ 'order' ] ) ; $ step -> setActivityHeight ( 0 ) ; // Link Step to its Activity if ( ! empty ( $ data [ 'activityNodeId' ] ) && ! empty ( $ createdResources [ $ data [ 'activityNodeId' ] ] ) ) { // Step has an Activity $ step -> setActivity ( $ createdResources [ $ data [ 'activityNodeId' ] ] ) ; } $ createdSteps [ $ data [ 'uid' ] ] = $ step ; $ this -> om -> persist ( $ step ) ; return $ createdSteps ; }
Import a Step.

@param Path  $path
@param array $data
@param array $createdResources
@param array $createdSteps

@return array
Import a Step .