2017-10-14
@override
@see \Df\Framework\Upgrade::_process()
@used-by \Df\Framework\Upgrade::process()
492525
final protected function _process() {
		/**
		 * 2016-08-22
		 * Помимо добавления поля в таблицу «customer_entity» надо ещё добавить атрибут,
		 * иначе данные не будут сохраняться:
		 *		$attribute = $this->getAttribute($k);
		 *		if (empty($attribute)) {
		 *			continue;
		 *		}
		 * https://github.com/magento/magento2/blob/2.1.0/app/code/Magento/Eav/Model/Entity/AbstractEntity.php#L1262-L1265
		 */
		if ($this->v('1.7.4')) {
			df_eav_setup()->addAttribute('customer', UpgradeSchema::F__DF, [
				'input' => 'text'
				,'label' => 'Mage2.PRO'
				,'position' => 1000
				,'required' => false
				,'sort_order' => 1000
				,'system' => false
				,'type' => 'static'
				,'visible' => false
			]);
		}
	}
671441
public function process()
    {
        $handler = $this->getHandler();
        $response = $handler->getPayPalResponse();
        $data = $handler->getData();

        $order = $this->getOrder();
        $amount = $order->getRemainingOrderSum();
        $order->setVoidedAmount($amount);
        $order->setPaymentStatus($data->getOrderStatus());
        $order->save();

        $payment = oxNew(\OxidEsales\PayPalModule\Model\OrderPayment::class);
        $payment->setDate($this->getDate());
        $payment->setTransactionId($response->getAuthorizationId());
        $payment->setCorrelationId($response->getCorrelationId());
        $payment->setAction('void');
        $payment->setStatus('Voided');
        $payment->setAmount($amount);

        $payment = $order->getPaymentList()->addPayment($payment);

        if ($data->getComment()) {
            $comment = oxNew(\OxidEsales\PayPalModule\Model\OrderPaymentComment::class);
            $comment->setComment($data->getComment());
            $payment->addComment($comment);
        }
    }
942062
public function process()
    {
        parent::process();

        if (is_int($this->background)) {

            extract($this->getBackgroundCoordinates($this->getGravity()));
            imagefill($this->resource, $x1, $y1, $this->background);
            imagefill($this->resource, $x2, $y2, $this->background);

        }
    }
39372
public function process()
    {
        parent::process();

        if ($this->show_check_all) {
            $this->check_all->process();
        }

        // this is part of the old selection API
        $item_name = $this->getCheckboxRendererId();
        if (isset($_POST[$item_name]) && is_array($_POST[$item_name])) {
            $this->items = $_POST[$item_name];
        }
    }
330389
public function process()
    {
        try {
            $this->processAlias();
            $this->processRoute();
            $this->output404();
        } catch (Exception $ex) {
            trigger_error($ex->getMessage());
            $this->response->outputError500();
        }
    }
908383
public function process()
    {
        $lang = $this->getLang();
        $request = $this->getRequest();
        $paymentBuilder = $this->getPaymentBuilder();
        $payPalOrderManager = $this->getOrderManager();

        // Create Payment from Request.
        $paymentBuilder->setLang($lang);
        $paymentBuilder->setRequest($request);
        $orderPayment = $paymentBuilder->buildPayment();

        $payPalOrderManager->setOrderPayment($orderPayment);
        $processSuccess = $payPalOrderManager->updateOrderStatus();

        return $processSuccess;
    }
882852
public function process()
    {
        if ($this->cacheOutput && $this->cache) {
            $contents = $this->input->process();
            $key = md5($contents);

            if (!($output = $this->cache->get($key))) {
                $output = $this->output->process($contents, $this->generator);
                $this->cache->set($key, $output);
            }
        } else {
            $output = $this->output->process(
                $this->input->process(),
                $this->generator
            );
        }

        return $output;
    }
1374179
public function process()
    {
        parent::process();

        if ($this->value === null) {
            return;
        }

        $float_value = $this->getNumericValue($this->value);

        if ($float_value === null) {
            $this->addMessage($this->getValidationMessage('float'));
        } else {
            $this->value = $float_value;
        }
    }
8156
public function process()
    {
        parent::process();

        $data = $this->getForm()->getFormData();

        $this->crop_width = $data[$this->id . '_width'];
        $this->crop_height = $data[$this->id . '_height'];
        $this->crop_left = $data[$this->id . '_x'];
        $this->crop_top = $data[$this->id . '_y'];

        // deprecated aliases
        $this->crop_box_width = $this->crop_width;
        $this->crop_box_height = $this->crop_height;
        $this->crop_box_left = $this->crop_left;
        $this->crop_box_top = $this->crop_top;
    }
665581
public function process()
    {
        parent::process();

        // process input cells
        foreach ($this->replicators as $replicator_id) {
            foreach ($this->input_cells as $cell) {
                $cell->process($replicator_id);
            }
        }
    }
1152911
public function process()
    {
        /*
         | Check for argument database name if not given we will use default
         |  database connection
         */
        $this->database = (!is_null($this->argument('database'))) ?
            $this->argument('database') :
            $this->table()->getDefaultDatabaseConnection();

        $this->tableName = (!is_null($this->argument('name'))) ?
            $this->argument('name') :
            'Form';

        $this->columns = $this->getColumns();
        $this->applicationDir = realpath(CYGNITE_BASE.DS.APPPATH);
        $this->generateForm();

        $this->info('Form '.APPPATH.'/Form/'.Inflector::classify($this->tableName).'Form'.EXT.' Generated Successfully!.');
    }
493235
public function process()
    {
        parent::process();

        $data = &$this->getForm()->getFormData();

        if (isset($data[$this->id])) {
            $this->clicked = true;
            $this->getForm()->button = $this;
        }
    }
1369368
public function process()
    {

        // load all available categories
        $categories = $this->getImportProcessor()->getCategories();

        // update the categories children count
        foreach ($categories as $category) {
            // load the category itself
            $this->category = $this->loadCategory($pk = $this->getPrimaryKey($category));

            // update the category's children count
            $this->persistCategory($this->initializeCategory($this->prepareAttributes()));

            // write a log message
            $this->getSystemLogger()->debug(
                sprintf('Successfully updated category with primary key %d', $pk)
            );
        }
    }
1166875
public function process ()
    {
        if ($this->isProcessed)
            return;
        $this->isProcessed = true;
        foreach ($this->getFields() as $field)
            /* @var $field Field */
            $field->preprocess();
        $this->isUserSubmitted = $this->getValue($this->getSubmitConfirmFieldName(), 'false') == 'true' || $this->forceSubmit;
        if ($this->isUserSubmitted) {
            foreach ($this->getFields() as $field)
                $field->restoreValue($this->method);

            $this->activateHandlers();

            if ($this->isValid()) {
                $this->submit();
            }
        }
    }
1234482
public function process()
    {
        switch ($this->inputs['action']) {
            case 'login':
                $this->webLogin();
                break;
            case 'logout':
                $this->webLogout();
                exit($this->showWebLoginForm());
                break;
            case 'getContacts':
                $this->getContacts();
                break;
            case 'updateStatus':
                $this->updateStatus();
                break;
            case 'sendMessage':
                $this->sendMessage();
                break;
            case 'sendBroadcast':
                $this->sendBroadcast();
                break;
            default:
                if (isset($_SESSION['logged_in']) && $_SESSION['logged_in'] == true) {
                    exit($this->showWebForm());
                }
                exit($this->showWebLoginForm());
                break;
        }
    }
1023925
public function process()
    {
        $this->argumentName = $this->argument('name');
        $this->appDir = CYGNITE_BASE.DS.APPPATH;
        $migrateTemplateDir =
            dirname(dirname(__FILE__)).DS.'src'.DS.'Apps'.DS.'Database'.DS;

        $migrateInstance = null;
        $migrateInstance = Migrator::instance($this);
        $this->table()->makeMigration('migrations');

        // We will generate migration class only if class name provided in command
        if (!is_null($this->argumentName)) {
            $migrateInstance->setTemplateDir($migrateTemplateDir);
            $migrateInstance->replaceTemplateByInput();
            $file = $migrateInstance->generate(new \DateTime('now', new \DateTimeZone(SET_TIME_ZONE)));

            if ($file) {
                $file = APP_NS.DS.'Resources'.DS.'Database'.DS.'Migrations'.DS.$file;
                $this->info('Your migration class generated in '.$file);
            }

            $this->info('Cool!! You are ready to use migration!');
        }
    }
791432
public function process()
    {
        $expr = $this->getExpression();
        $state = $this->getState();

        $var = $state->getVariable($expr->getIdentifier());

        return ($var === null) ? null : $var->getDefaultValue();
    }