plugin/path/Manager/PathManager.php
public function import($structure, array $data, array $resourcesCreated = [])
    {
        // Create a new Path object which will be populated with exported data
        $path = new Path();

        $pathData = $data['data']['path'];

        // Populate Path properties
        $path->setDescription($pathData['description']);
        $path->setOpenSummary($pathData['summaryDisplayed']);
        $path->setManualProgressionAllowed($pathData['manualProgressionAllowed']);

        // Create steps
        $stepData = $data['data']['steps'];
        if (!empty($stepData)) {
            $createdSteps = [];
            foreach ($stepData as $step) {
                $createdSteps = $this->importStep($path, $step, $resourcesCreated, $createdSteps);
            }
        }

        // Inject empty structure into path (will be replaced by a version with updated IDs later in the import process)
        $path->setStructure($structure);

        return $path;
    }
public function import($structure, array $data, array $resourcesCreated = [])
    {
        // Create a new Path object which will be populated with exported data
        $path = new Path();

        $pathData = $data['data']['path'];

        // Populate Path properties
        $path->setDescription($pathData['description']);
        $path->setOpenSummary($pathData['summaryDisplayed']);
        $path->setManualProgressionAllowed($pathData['manualProgressionAllowed']);

        // Create steps
        $stepData = $data['data']['steps'];
        if (!empty($stepData)) {
            $createdSteps = [];
            foreach ($stepData as $step) {
                $createdSteps = $this->importStep($path, $step, $resourcesCreated, $createdSteps);
            }
        }

        // Inject empty structure into path (will be replaced by a version with updated IDs later in the import process)
        $path->setStructure($structure);

        return $path;
    }
public function import ( $ structure , array $ data , array $ resourcesCreated = [ ] ) { // Create a new Path object which will be populated with exported data $ path = new Path ( ) ; $ pathData = $ data [ 'data' ] [ 'path' ] ; // Populate Path properties $ path -> setDescription ( $ pathData [ 'description' ] ) ; $ path -> setOpenSummary ( $ pathData [ 'summaryDisplayed' ] ) ; $ path -> setManualProgressionAllowed ( $ pathData [ 'manualProgressionAllowed' ] ) ; // Create steps $ stepData = $ data [ 'data' ] [ 'steps' ] ; if ( ! empty ( $ stepData ) ) { $ createdSteps = [ ] ; foreach ( $ stepData as $ step ) { $ createdSteps = $ this -> importStep ( $ path , $ step , $ resourcesCreated , $ createdSteps ) ; } } // Inject empty structure into path (will be replaced by a version with updated IDs later in the import process) $ path -> setStructure ( $ structure ) ; return $ path ; }
Import a Path into the Platform.

@param string $structure
@param array  $data
@param array  $resourcesCreated

@return Path
Import a Path into the Platform .