private function importFromDefinitions(array $dataTypes, array $definitions)
    {
        foreach ($dataTypes as $dataTypeHandle) {
            $dataType = $this->module->getDataType($dataTypeHandle);
            if (null == $dataType) {
                continue;
            }

            $mapper = $dataType->getMapperHandle();
            if (!$this->module->checkMapper($mapper)) {
                continue;
            }

            Schematic::info('Importing '.$dataTypeHandle);
            Schematic::$force = $this->force;
            if (array_key_exists($dataTypeHandle, $definitions) && is_array($definitions[$dataTypeHandle])) {
                $records = $dataType->getRecords();
                try {
                    $this->module->$mapper->import($definitions[$dataTypeHandle], $records);
                    $dataType->afterImport();
                } catch (WrongEditionException $e) {
                    Schematic::error('Craft Pro is required for datatype '.$dataTypeHandle);
                }
            }
        }
    }
private function importFromDefinitions(array $dataTypes, array $definitions)
    {
        foreach ($dataTypes as $dataTypeHandle) {
            $dataType = $this->module->getDataType($dataTypeHandle);
            if (null == $dataType) {
                continue;
            }

            $mapper = $dataType->getMapperHandle();
            if (!$this->module->checkMapper($mapper)) {
                continue;
            }

            Schematic::info('Importing '.$dataTypeHandle);
            Schematic::$force = $this->force;
            if (array_key_exists($dataTypeHandle, $definitions) && is_array($definitions[$dataTypeHandle])) {
                $records = $dataType->getRecords();
                try {
                    $this->module->$mapper->import($definitions[$dataTypeHandle], $records);
                    $dataType->afterImport();
                } catch (WrongEditionException $e) {
                    Schematic::error('Craft Pro is required for datatype '.$dataTypeHandle);
                }
            }
        }
    }
private function importFromDefinitions ( array $ dataTypes , array $ definitions ) { foreach ( $ dataTypes as $ dataTypeHandle ) { $ dataType = $ this -> module -> getDataType ( $ dataTypeHandle ) ; if ( null == $ dataType ) { continue ; } $ mapper = $ dataType -> getMapperHandle ( ) ; if ( ! $ this -> module -> checkMapper ( $ mapper ) ) { continue ; } Schematic :: info ( 'Importing ' . $ dataTypeHandle ) ; Schematic :: $ force = $ this -> force ; if ( array_key_exists ( $ dataTypeHandle , $ definitions ) && is_array ( $ definitions [ $ dataTypeHandle ] ) ) { $ records = $ dataType -> getRecords ( ) ; try { $ this -> module -> $ mapper -> import ( $ definitions [ $ dataTypeHandle ] , $ records ) ; $ dataType -> afterImport ( ) ; } catch ( WrongEditionException $ e ) { Schematic :: error ( 'Craft Pro is required for datatype ' . $ dataTypeHandle ) ; } } } }
Import from definitions.

@param array $dataTypes   The data types to import
@param array $definitions The definitions to use
@throws \Exception
Import from definitions .