Processes the 'package' stage of the export

@return bool whether or not to process the next stage. this is important as the control function is called recursively.
@throws portfolio_export_exception
512092
public function process_stage_package() {
        // now we've agreed on a format,
        // the caller is given control to package it up however it wants
        // and then the portfolio plugin is given control to do whatever it wants.
        try {
            $this->caller->prepare_package();
        } catch (portfolio_exception $e) {
            throw new portfolio_export_exception($this, 'callercouldnotpackage', 'portfolio', null, $e->getMessage());
        }
        catch (file_exception $e) {
            throw new portfolio_export_exception($this, 'callercouldnotpackage', 'portfolio', null, $e->getMessage());
        }
        try {
            $this->instance->prepare_package();
        }
        catch (portfolio_exception $e) {
            throw new portfolio_export_exception($this, 'plugincouldnotpackage', 'portfolio', null, $e->getMessage());
        }
        catch (file_exception $e) {
            throw new portfolio_export_exception($this, 'plugincouldnotpackage', 'portfolio', null, $e->getMessage());
        }
        return true;
    }
386691
public function isPackage()
	{
		if ( ! parent::isPackage() ) return false;

		// If it is a package then is an IFRS taxonomy package?
		// An IFRS package is characterised by having one or more of the
		// package entry points be the entry points in the XBRL_IFRS entry point list
		// and no instance document.
		// Check the entry points first because they are already in an array.
		foreach ( $this->getSchemaEntryPoints() as $entryPoint )
		{
			if ( XBRL::startsWith( $entryPoint, "http://xbrl.ifrs.org/" ) ) return true;
		}

		return false;
	}
18201
protected function ProcessStep()
    {
        $bContinue = parent::ProcessStep();
        if ($bContinue) {
            $aInput = TGlobal::instance()->GetUserData('aInput');
            if (!is_array($aInput)) {
                $aInput = array();
            }
            $sCardId = false;
            $sWrappId = false;
            $aArticleIds = false;
            if (array_key_exists('shop_wrapping_id', $aInput) && !empty($aInput['shop_wrapping_id'])) {
                $sWrappId = $aInput['shop_wrapping_id'];
            }
            if (array_key_exists('shop_wrapping_card_id', $aInput) && !empty($aInput['shop_wrapping_card_id'])) {
                $sCardId = $aInput['shop_wrapping_card_id'];
            }
            if (array_key_exists('shop_article_id', $aInput)) {
                if (is_array($aInput['shop_article_id'])) {
                    $aArticleIds = $aInput['shop_article_id'];
                } elseif (!empty($aInput['shop_article_id'])) {
                    $aArticleIds = array($aInput['shop_article_id']);
                }
            }

            $oBasket = TShopBasket::GetInstance();
            if ($sWrappId) {
                $oBasket->AddWrapping($sWrappId, $aArticleIds);
            }
            if ($sCardId) {
                $oBasket->AddWrappingCard($sCardId, $aArticleIds);
            }
        }
        if ($bContinue) {
            $sNextStep = TGlobal::instance()->GetUserData('nextStep');
            if (!empty($sNextStep)) {
                $oStep = TdbShopOrderStep::GetStep($sNextStep);
                $this->JumpToStep($oStep);
            }
        }

        return $bContinue;
    }
652495
public function process()
    {
        parent::process();
        try {
            $this->profile = Teleport::loadProfile($this->profile);

            $this->getMODX($this->profile);

            $this->modx->setOption(\xPDO::OPT_SETUP, true);

            $this->modx->loadClass('transport.xPDOTransport', XPDO_CORE_PATH, true, true);
            $this->modx->loadClass('transport.xPDOVehicle', XPDO_CORE_PATH, true, true);
            $this->modx->loadClass('transport.xPDOObjectVehicle', XPDO_CORE_PATH, true, true);
            $this->modx->loadClass('transport.xPDOFileVehicle', XPDO_CORE_PATH, true, true);

            $transportName = basename($this->source);
            if (TELEPORT_BASE_PATH . 'workspace' . DIRECTORY_SEPARATOR . $transportName !== realpath($this->source)) {
                if (!$this->pull($this->source, TELEPORT_BASE_PATH . 'workspace' . DIRECTORY_SEPARATOR . $transportName)) {
                    throw new ActionException($this, "Error pulling {$this->source}");
                }
            } else {
                $this->preserveWorkspace = true;
            }

            $this->package = Transport::retrieve($this->modx, TELEPORT_BASE_PATH . 'workspace' . DIRECTORY_SEPARATOR . $transportName, TELEPORT_BASE_PATH . 'workspace' . DIRECTORY_SEPARATOR);
            if (!$this->package instanceof Transport) {
                throw new ActionException($this, "Error extracting {$transportName} in workspace" . DIRECTORY_SEPARATOR);
            }

            $this->package->preInstall();

            if (!$this->package->install(array(\xPDOTransport::PREEXISTING_MODE => \xPDOTransport::REMOVE_PREEXISTING))) {
                throw new ActionException($this, "Error installing {$transportName}");
            }

            $this->package->postInstall();

            if ($this->modx->getCacheManager()) {
                $this->modx->cacheManager->refresh();
            }

            if (!$this->preserveWorkspace && $this->modx->getCacheManager()) {
                $this->modx->cacheManager->deleteTree($this->package->path . $transportName);
                @unlink($this->package->path . $transportName . '.transport.zip');
            }

            $this->request->log("Successfully injected {$transportName} into instance {$this->profile->code}");
        } catch (\Exception $e) {
            throw new ActionException($this, 'Error injecting snapshot: ' . $e->getMessage(), $e);
        }
    }
1021006
protected function process()
    {

        // query whether or not, the image changed
        if ($this->isParentImage($this->getValue(ColumnKeys::IMAGE_PATH))) {
            return;
        }

        // try to load the product SKU and map it the entity ID
        $this->parentId = $this->getValue(ColumnKeys::IMAGE_PARENT_SKU, null, array($this, 'mapParentSku'));

        // reset the position counter for the product media gallery value
        $this->resetPositionCounter();

        // initialize and persist the product media gallery
        $productMediaGallery = $this->initializeProductMediaGallery($this->prepareProductMediaGalleryAttributes());
        $this->valueId = $this->persistProductMediaGallery($productMediaGallery);

        // persist the product media gallery to entity data
        if ($productMediaGalleryValueToEntity = $this->initializeProductMediaGalleryValueToEntity($this->prepareProductMediaGalleryValueToEntityAttributes())) {
            $this->persistProductMediaGalleryValueToEntity($productMediaGalleryValueToEntity);
        }

        // temporarily persist parent/value ID
        $this->setParentId($this->parentId);
        $this->setParentValueId($this->valueId);
    }
751455
function run()
    {
        if ( $this->HTTP->hasPostVariable( 'PreviousButton' ) )
        {
            return $this->previousStep();
        }

        switch( $this->metaData( 'current_stage' ) )
        {
            case eZWizardBase::STAGE_PRE:
            {
                $this->preCheck();
                $this->nextStep();
                if ( $this->skip() )
                {
                    return $this->nextStep();
                }
                return $this->process();
            } break;

            case eZWizardBase::STAGE_POST:
            {
                if ( $this->postCheck() )
                {
                    return $this->nextStep();
                }
                else
                {
                    return $this->process();
                }
            } break;
        }
    }
1012678
public function process()
    {
        $table = $this->argument('name');
        // Your model name
        $this->model = Inflector::classify($table);
        /*
         | Check for argument database name if not given
         | we will use default database connection
         */
        $this->database = $this->getDatabase();
        $this->columns = $this->getColumns();

        if (empty($this->columns)) {
            exit($this->error("Please check your model name. It seems table '$table' doesn't exists!"));
        }

        $this->applicationDir = CYGNITE_BASE.DS.APPPATH;
        $this->generateModel();

        $modelPath = APPPATH.DS.'Models'.DS.$this->model.EXT;

        $this->info("Model $this->model Generated Successfully Into ".$modelPath);
    }
476972
public function doExport()
    {
        $this->downloadCsvExport();

        $settings = $this->module->getSettings('export');

        if (empty($settings['columns'])) {
            $settings['columns'] = array_keys($settings['header']);
        }

        $this->setData('settings', $settings);
        $this->setData('columns', $settings['header']);
        $this->setData('stores', $this->store->getList());

        $this->submitExport();
        $this->setTitleDoExport();
        $this->setBreadcrumbDoExport();

        $this->outputDoExport();
    }
853443
public function addExportAction()
    {
        $options = array(
            'class'  => 'model-export',
            'target' => null,
            'title'  => $this->_('Export the current data set'),
        );

        return $this->addActionButton($this->_('Export'), $this->get('privilege') . '.export', 'export', $options);
    }
109329
public function doExecute()
    {
        $vendors = (array) $this->assets;

        foreach ($vendors as $vendor => $files) {
            if (!is_dir($this->vendorPath . '/' . $vendor)) {
                continue;
            }

            $this->runHook('before-' . $vendor, $vendor, $files);

            foreach ($files as $src => $dest) {
                $message = $this->copy($this->vendorPath . '/' . $vendor . '/' . $src, $this->assetPath . '/' . $dest);

                $this->out($message);
            }

            $this->runHook('after-' . $vendor, $vendor, $files);
        }

//        Folder::delete($this->getVendorPath());

        $this->out('Install complete');
    }
143095
protected function _process()
	{
		$this->_msg('Rebuilding catalog index for demo data', 0);

		MShop_Factory::createManager( $this->_additional, 'catalog/index' )->rebuildIndex();

		$this->_status( 'done' );
	}
1059239
protected function process()
    {

        // prepare the store view code
        $this->prepareStoreViewCode($this->getRow());

        // return immediately if we're have no store view code set
        if (StoreViewCodes::ADMIN !== $this->getStoreViewCode(StoreViewCodes::ADMIN)) {
            return;
        }

        // query whether or not the option has already been created
        if (!$this->exists($name = $this->getValue(ColumnKeys::BUNDLE_VALUE_NAME))) {
            // load the bundle option
            $bundleOption = $this->initializeBundleOption($this->prepareAttributes());

            // persist the product bundle option
            $optionId = $this->persistProductBundleOption($bundleOption);

            // store the name => option ID mapping
            $this->addNameOptionIdMapping($name, $optionId);
        }
    }
1071607
public function process()
    {
        // Skip blank queues
        if (empty($this->batches)) {
            return true;
        }

        // Don't re-process completed queue
        if ($this->currentBatch >= count($this->batches)) {
            return true;
        }

        // Send current patch to indexes
        $this->prepareIndexes();

        // Advance to next batch if successful
        $this->setBatch($this->currentBatch + 1);
        return true;
    }
235190
public function Start()
    {
        if(!$this->definitions_path)
        {
            throw new \Exception(
                t("Your are trying to export definitions without setting a path first.")
            );
        }
        elseif(!file_exists($this->definitions_path))
        {
            FileSystem::MakeDir(
                $this->definitions_path, 
                0755, 
                true
            );
        }
        
        $this->definitions_path = rtrim($this->definitions_path, "\\/") . "/";
        
        $this->SendMessage(
            sprintf(
                t("Starting export of definitions to %s format."),
                $this->export_type
            )
        );
        
        if($this->export_type == Type::JSON)
        {
            $this->SaveToJSON($this->definitions_path);
        }
        else
        {
            $this->SaveToPHP($this->definitions_path);
        }
        
        $this->SendMessage(t("Export completed."));
    }
447618
public function run()
	{
		$this->say('Building component');

		// Analyize extension structure
		$this->analyze();

		// Prepare directories
		$this->prepareDirectories();

		if ($this->hasAdmin)
		{
			$adminFiles = $this->copyTarget($this->adminPath, $this->getBuildFolder() . "/administrator/components/com_" . $this->getExtensionName());

			$this->addFiles('backend', $adminFiles);
		}

		if ($this->hasFront)
		{
			$frontendFiles = $this->copyTarget($this->frontPath, $this->getBuildFolder() . "/components/com_" . $this->getExtensionName());

			$this->addFiles('frontend', $frontendFiles);
		}

		// Build media (relative path)
		$media = $this->buildMedia("media/com_" . $this->getExtensionName());
		$media->run();

		$this->addFiles('media', $media->getResultFiles());

		$language = $this->buildLanguage("com_matukio");
		$language->run();

		return true;
	}
150908
public function process()
	{
		$view = $this->getView();

		try
		{
			parent::process();

			$basketCntl = Controller_Frontend_Factory::createController( $this->_getContext(), 'basket' );

			// Test if addresses are available
			$addresses = $basketCntl->get()->getAddresses();
			if( !isset( $view->standardStepActive ) && count( $addresses ) === 0 )
			{
				$view->standardStepActive = 'address';
				return false;
			}
		}
		catch( Exception $e )
		{
			$this->getView()->standardStepActive = 'address';
			throw $e;
		}

	}
874074
protected function doExecute()
    {
        $hard = $this->getOption('hard');

        // Prepare path
        $name = $this->io->getArgument(0);

        /** @var WebApplication $env */
        $env = $this->getOption('env');

        $resolver = ConsoleHelper::getAllPackagesResolver($env, $this->console);

        if (!$name) {
            throw new \InvalidArgumentException('No package input.');
        }

        $package = $resolver->getPackage($name);

        if ($package) {
            $dir = $package->getDir() . '/Resources/asset';
        } else {
            throw new \InvalidArgumentException('Package ' . $name . ' not found.');
        }

        if (!is_dir($dir)) {
            throw new \InvalidArgumentException(
                'This package has no <comment>/Resources/asset</comment> folder so nothing synced.'
            );
        }

        $folder = $this->console->get('asset.folder');
        $target = $this->getArgument(1, $name);
        $target = $this->console->get('path.public') . '/' . trim($folder, '/') . '/' . $target;

        $symlink = new Symlink();
        $force   = $this->getOption('force');

        if (is_link($target)) {
            if (!$force) {
                throw new \RuntimeException('Link ' . $target . ' already created.');
            }

            $this->out('Link file: <comment>' . $target . '</comment> exists, force replace it.');

            File::delete($target);
        }

        if ($hard) {
            $this->hardCopy($dir, $target);

            $this->out('Copy folder ' . $dir . ' to ' . $target);
        } else {
            $this->out($symlink->make($dir, $target));

            if (!PlatformHelper::isWindows()) {
                $this->out('Link success <info>' . $dir . '</info> <====> <info>' . $target . '</info>');
            }
        }

        return true;
    }