Processes the input, e.g. store given values.
A view must be available and this method doesn't generate any output
besides setting view variables.
481041
public function process()
	{
		try
		{
			$view = $this->getView();

			if( ( $id = $view->param( 'sub_id' ) ) != null && $view->param( 'sub_action' ) === 'cancel' ) {
				\Aimeos\Controller\Frontend::create( $this->getContext(), 'subscription' )->cancel( $id );
			}

			parent::process();
		}
		catch( \Exception $e )
		{
			$this->logException( $e );
		}
	}
1279997
public function processAction() {
        // allow callers to set a targetUrl via the request
        if ($targetUrl = $this->_getSubmittedTargetUrl()) {
            Garp_Auth::getInstance()->getStore()->targetUrl = $targetUrl;
        }

        // never cache the process request
        $this->_helper->cache->setNoCacheHeaders($this->getResponse());
        // This action does not render a view, it only redirects elsewhere.
        $this->_helper->viewRenderer->setNoRender(true);
        $method = $this->getRequest()->getParam('method') ?: 'db';
        $adapter = Garp_Auth_Factory::getAdapter($method);
        $authVars = Garp_Auth::getInstance()->getConfigValues();

        $postData = $this->getRequest()->getPost();
        // Before login hook.
        $this->_beforeLogin($authVars, $adapter, $postData);

        /**
         * Params can come from GET or POST.
         * The implementing adapter should decide which to use,
         * using the current request to fetch params.
         */
        if (!$userData = $adapter->authenticate($this->getRequest(), $this->getResponse())) {
            $this->_respondToFaultyProcess($adapter);
            return;
        }

        $this->_helper->viewRenderer->setNoRender(true);

        // Check if adapter issued a redirect (as is the case with oAuth for instance)
        if ($this->getResponse()->isRedirect()) {
            return;
        }

        if ($userData instanceof Garp_Db_Table_Row) {
            $userData = $userData->toArray();
        }

        // Save user data in a store.
        Garp_Auth::getInstance()->store($userData, $method);

        // Store User role in a cookie, so that we can use it with Javascript.
        if (!Garp_Auth::getInstance()->getStore() instanceof Garp_Store_Cookie) {
            $this->_storeRoleInCookie();
        }

        // Determine targetUrl.
        // This is the URL the user was trying to access before logging in, or a default URL.
        $router = Zend_Controller_Front::getInstance()->getRouter();
        if (!empty($authVars['login']['successRoute'])) {
            $targetUrl = $router->assemble(array(), $authVars['login']['successRoute']);
        } elseif (!empty($authVars['login']['successUrl'])) {
            $targetUrl = $authVars['login']['successUrl'];
        } else {
            $targetUrl = '/';
        }
        $store = Garp_Auth::getInstance()->getStore();
        if ($store->targetUrl) {
            $targetUrl = $store->targetUrl;
            unset($store->targetUrl);
        }

        // After login hook.
        $this->_afterLogin($userData, $targetUrl);

        // Set a Flash message welcoming the user.
        $flashMessenger = $this->_helper->getHelper('FlashMessenger');
        $fullName = new Garp_Util_FullName($userData);
        $successMsg = __($authVars['login']['successMessage']);
        if (strpos($successMsg, '%s') !== false) {
            $successMsg = sprintf($successMsg, $fullName);
        } elseif (strpos('%USERNAME%', $successMsg) !== false) {
            $successMsg = Garp_Util_String::interpolate(
                $successMsg, array(
                'USERNAME' => $fullName
                )
            );
        }
        $flashMessenger->addMessage($successMsg);
        $this->_redirect($targetUrl);
    }
1365823
def process_view(self, request, view_func, view_args, view_kwargs):
        
        try:
            if ignore_path(request.path):
                TrackedRequest.instance().tag("ignore_transaction", True)

            view_name = request.resolver_match._func_path
            span = TrackedRequest.instance().current_span()
            if span is not None:
                span.operation = "Controller/" + view_name
                Context.add("path", request.path)
                Context.add("user_ip", RemoteIp.lookup_from_headers(request.META))
                if getattr(request, "user", None) is not None:
                    Context.add("username", request.user.get_username())
        except Exception:
            pass
1369908
public function process()
	{
		$view = $this->getView();

		try
		{
			$context = $this->_getContext();
			$basketCtrl = Controller_Frontend_Factory::createController( $context, 'basket' );

			// only start if there's something to do
			if( ( $serviceId = $view->param( 'c-payment-option', null ) ) !== null )
			{
				$serviceCtrl = Controller_Frontend_Factory::createController( $context, 'service' );

				$attributes = $view->param( 'c-payment/' . $serviceId, array() );
				$errors = $serviceCtrl->checkServiceAttributes( 'payment', $serviceId, $attributes );

				foreach( $errors as $key => $msg )
				{
					if( $msg === null ) {
						unset( $errors[$key] );
					}
				}

				if( count( $errors ) === 0 ) {
					$basketCtrl->setService( 'payment', $serviceId, $attributes );
				} else {
					$view->standardStepActive = 'payment';
				}

				$view->paymentError = $errors;
			}


			parent::process();


			// Test if payment service is available
			$services = $basketCtrl->get()->getServices();
			if( !isset( $view->standardStepActive ) && !array_key_exists( 'payment', $services ) )
			{
				$view->standardStepActive = 'payment';
				return false;
			}
		}
		catch( Exception $e )
		{
			$view->standardStepActive = 'payment';
			throw $e;
		}
	}
661535
public function process()
    {
        $this->initializeStorageNode($this->storageNodeNodePath, $this->storageNodeTitle);
        $this->initializeNodeTemplates();

        $nodeTemplate = new NodeTemplate();
        $this->processBatch($nodeTemplate);
    }
663584
def process_views(self):
        """"""
        output = {}
        logger.debug("Processing %d view(s)...", len(self.views))
        for view_name, view in iteritems(self.views):
            try:
                output = deep_merge_dict(
                    output,
                    view.process(
                        self.db,
                        safe_mode=self.safe_mode,
                        extra_context=self.project_context
                    )
                )
            except StatikError as exc:
                # just re-raise it
                raise exc

            except Exception as exc:
                # for unhandled view-related exceptions, raise our own exception
                raise ViewError(
                    message="Failed to render view \"%s\"." % view_name,
                    orig_exc=exc
                )

        return output
962569
protected function process()
    {

        // initialize the store view code
        $this->getSubject()->prepareStoreViewCode();

        // load the PK
        $pk = $this->getValue($this->getPrimaryKeyColumnName());

        // load the store view - if no store view has been set, we assume the admin
        // store view, which will contain the default (fallback) attribute values
        $storeViewCode = $this->getSubject()->getStoreViewCode(StoreViewCodes::ADMIN);

        // query whether or not the row has already been processed
        if ($this->storeViewHasBeenProcessed($pk, $storeViewCode)) {
            // log a message
            $this->getSystemLogger()->warning(
                $this->getSubject()->appendExceptionSuffix(
                    sprintf(
                        'Attributes for %s "%s" + store view code "%s" has already been processed',
                        $this->getPrimaryKeyColumnName(),
                        $pk,
                        $storeViewCode
                    )
                )
            );

            // return immediately
            return;
        }

        // load the store ID, use the admin store if NO store view code has been set
        $storeId = $this->getSubject()->getRowStoreId(StoreViewCodes::ADMIN);

        // load the image attribute
        $attribute = $this->getEavAttributeByAttributeCode('image');

        // remove the image if one exists
        if ($value = $this->loadVarcharAttribute($pk, $attribute[MemberNames::ATTRIBUTE_ID], $storeId)) {
            $this->deleteVarcharAttribute(array(MemberNames::VALUE_ID => $value[MemberNames::VALUE_ID]));
        }
    }
1009138
public function process()
	{
		$view = $this->getView();
		$context = $this->getContext();

		try
		{
			$cntl = \Aimeos\Controller\Frontend::create( $context, 'service' );
			$cntl->updatePush( $view->request(), $view->response(), $view->param( 'code' ) );

			parent::process();
		}
		catch( \Exception $e )
		{
			$view->response()->withStatus( 500, 'Error updating order status' );
			$view->response()->getBody()->write( $e->getMessage() );

			$params = print_r( $view->param(), true );
			$body = (string) $view->request()->getBody();
			$msg = "Updating order status failed: %1\$s\n%2\$s\n%3\$s";
			$context->getLogger()->log( sprintf( $msg, $e->getMessage(), $params, $body ) );
		}
	}
806429
private void processSavedViewState() throws IOException
   {
      DirectoryEntry dir = (DirectoryEntry) m_viewDir.getEntry("CEdl");
      VarMeta varMeta = new VarMeta9(new DocumentInputStream(((DocumentEntry) dir.getEntry("VarMeta"))));
      Var2Data varData = new Var2Data(varMeta, new DocumentInputStream(((DocumentEntry) dir.getEntry("Var2Data"))));
      //System.out.println(varMeta);
      //System.out.println(varData);

      InputStream is = m_inputStreamFactory.getInstance(dir, "FixedData");
      byte[] fixedData = new byte[is.available()];
      is.read(fixedData);
      //System.out.println(ByteArrayHelper.hexdump(fixedData, false, 16, ""));

      ViewStateReader reader = new ViewStateReader9();
      reader.process(m_file, varData, fixedData);
   }
880281
protected void process(String text, Map params, Writer writer){

        try{
            Template t = new Template("temp", new StringReader(text), FreeMarkerTL.getEnvironment().getConfiguration());
            t.process(params, writer);
        }catch(Exception e){          
            throw new ViewException(e);
        }
    }
508828
public function process()
	{
		$context = $this->getContext();
		$view = $this->getView();

		try
		{
			$site = $context->getLocale()->getSite()->getCode();
			$params = $this->getClientParams( $view->param() );
			$context->getSession()->set( 'aimeos/catalog/detail/params/last/' . $site, $params );

			parent::process();
		}
		catch( \Aimeos\Client\Html\Exception $e )
		{
			$error = array( $context->getI18n()->dt( 'client', $e->getMessage() ) );
			$view->detailErrorList = $view->get( 'detailErrorList', [] ) + $error;
		}
		catch( \Aimeos\Controller\Frontend\Exception $e )
		{
			$error = array( $context->getI18n()->dt( 'controller/frontend', $e->getMessage() ) );
			$view->detailErrorList = $view->get( 'detailErrorList', [] ) + $error;
		}
		catch( \Aimeos\MShop\Exception $e )
		{
			$error = array( $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
			$view->detailErrorList = $view->get( 'detailErrorList', [] ) + $error;
		}
		catch( \Exception $e )
		{
			$error = array( $context->getI18n()->dt( 'client', 'A non-recoverable error occured' ) );
			$view->detailErrorList = $view->get( 'detailErrorList', [] ) + $error;
			$this->logException( $e );
		}
	}
272869
public function process()
	{
		$view = $this->getView();

		try
		{
			// only start if there's something to do
			if( $view->param( 'ca-billing-option', null ) === null ) {
				return;
			}

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


			/** client/html/common/address/billing/disable-new
			 * Disables the option to enter a new billing address for an order
			 *
			 * Besides the main billing address, customers can usually enter a new
			 * billing address as well. To suppress displaying the form fields for
			 * a billing address, you can set this configuration option to "1".
			 *
			 * @param boolean A value of "1" to disable, "0" enables the billing address form
			 * @since 2014.03
			 * @category User
			 * @category Developer
			 * @see client/html/common/address/billing/salutations
			 * @see client/html/common/address/billing/mandatory
			 * @see client/html/common/address/billing/optional
			 * @see client/html/common/address/billing/hidden
			 */
			$disable = $view->config( 'client/html/common/address/billing/disable-new', false );
			$type = MShop_Order_Item_Base_Address_Abstract::TYPE_PAYMENT;

			if( ( $option = $view->param( 'ca-billing-option', 'null' ) ) === 'null' && $disable === false ) // new address
			{
				$params = $view->param( 'ca-billing', array() );
				$invalid = $this->_checkFields( $params );

				if( count( $invalid ) > 0 )
				{
					$view->billingError = $invalid;
					throw new Client_Html_Exception( sprintf( 'At least one billing address part is missing or invalid' ) );
				}

				$basketCtrl->setAddress( $type, $params );
			}
			else // existing address
			{
				$customerManager = MShop_Factory::createManager( $context, 'customer' );

				$search = $customerManager->createSearch( true );
				$expr = array(
					$search->compare( '==', 'customer.id', $option ),
					$search->getConditions(),
				);
				$search->setConditions( $search->combine( '&&', $expr ) );

				$items = $customerManager->searchItems( $search );

				if( ( $item = reset( $items ) ) === false || $option != $context->getUserId() ) {
					throw new Client_Html_Exception( sprintf( 'Customer with ID "%1$s" not found', $option ) );
				}

				$invalid = array();
				$addr = $item->getPaymentAddress();
				$params = $view->param( 'ca-billing-' . $option, array() );

				if( !empty( $params ) )
				{
					$list = array();
					$invalid = $this->_checkFields( $params );

					foreach( $params as $key => $value ) {
						$list[ str_replace( 'order.base', 'customer', $key ) ] = $value;
					}

					$addr->fromArray( $list );
					$item->setPaymentAddress( $addr );

					$customerManager->saveItem( $item );
				}

				if( count( $invalid ) > 0 )
				{
					$view->billingError = $invalid;
					throw new Client_Html_Exception( sprintf( 'At least one billing address part is missing or invalid' ) );
				}

				$basketCtrl->setAddress( $type, $addr );
			}

			parent::process();
		}
		catch( Controller_Frontend_Exception $e )
		{
			$view->billingError = $e->getErrorList();
			throw $e;
		}
	}
971036
protected function process()
    {

        // initialize the array for the artefacts and the store view codes
        $this->artefacts = array();
        $storeViewCodes = array();

        // load the SKU from the row
        $sku = $this->getValue(ColumnKeys::SKU);

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

        // try to load the store view code
        $storeViewCode = $this->getSubject()->getStoreViewCode(StoreViewCodes::ADMIN);

        // query whether or not we've a store view code
        if ($storeViewCode === StoreViewCodes::ADMIN) {
            // if not, load the websites the product is related with
            $websiteCodes = $this->getValue(ColumnKeys::PRODUCT_WEBSITES, array(), array($this, 'explode'));

            // load the store view codes of all websites
            foreach ($websiteCodes as $websiteCode) {
                $storeViewCodes = array_merge($storeViewCodes, $this->getStoreViewCodesByWebsiteCode($websiteCode));
            }
        } else {
            array_push($storeViewCodes, $storeViewCode);
        }

        // iterate over the available image fields
        foreach ($storeViewCodes as $storeViewCode) {
            // iterate over the store view codes and query if artefacts are already available
            if ($this->hasArtefactsByTypeAndEntityId(ProductUrlRewriteObserver::ARTEFACT_TYPE, $lastEntityId = $this->getSubject()->getLastEntityId())) {
                // if yes, load the artefacs
                $this->artefacts = $this->getArtefactsByTypeAndEntityId(ProductUrlRewriteObserver::ARTEFACT_TYPE, $lastEntityId);

                // override the existing data with the store view specific one
                for ($i = 0; $i < sizeof($this->artefacts); $i++) {
                    // query whether or not a URL key has be specfied and the store view codes are equal
                    if ($this->hasValue(ColumnKeys::URL_KEY) && $this->artefacts[$i][ColumnKeys::STORE_VIEW_CODE] === $storeViewCode) {
                        // update the URL key
                        $this->artefacts[$i][ColumnKeys::URL_KEY] = $this->getValue(ColumnKeys::URL_KEY);

                        // also update filename and line number
                        $this->artefacts[$i][ColumnKeys::ORIGINAL_DATA][ColumnKeys::ORIGINAL_FILENAME] = $this->getSubject()->getFilename();
                        $this->artefacts[$i][ColumnKeys::ORIGINAL_DATA][ColumnKeys::ORIGINAL_LINE_NUMBER] = $this->getSubject()->getLineNumber();
                    }
                }
            } else {
                // if no arefacts are available, append new data
                $artefact = $this->newArtefact(
                    array(
                        ColumnKeys::SKU                => $sku,
                        ColumnKeys::STORE_VIEW_CODE    => $storeViewCode,
                        ColumnKeys::CATEGORIES         => $this->getValue(ColumnKeys::CATEGORIES),
                        ColumnKeys::PRODUCT_WEBSITES   => $this->getValue(ColumnKeys::PRODUCT_WEBSITES),
                        ColumnKeys::VISIBILITY         => $this->getValue(ColumnKeys::VISIBILITY),
                        ColumnKeys::URL_KEY            => $this->getValue(ColumnKeys::URL_KEY)
                    ),
                    array(
                        ColumnKeys::SKU                => ColumnKeys::SKU,
                        ColumnKeys::STORE_VIEW_CODE    => ColumnKeys::STORE_VIEW_CODE,
                        ColumnKeys::CATEGORIES         => ColumnKeys::CATEGORIES,
                        ColumnKeys::PRODUCT_WEBSITES   => ColumnKeys::PRODUCT_WEBSITES,
                        ColumnKeys::VISIBILITY         => ColumnKeys::VISIBILITY,
                        ColumnKeys::URL_KEY            => ColumnKeys::URL_KEY,
                    )
                );

                // append the base image to the artefacts
                $this->artefacts[] = $artefact;
            }
        }

        // append the artefacts that has to be exported to the subject
        $this->addArtefacts($this->artefacts);
    }
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;
		}

	}
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;
        }
    }
196097
public function process()
    {
        $this->getVisitor();
        $this->saveVisitor();

        if (!$this->visitor->hasUserId() && !Yii::$app->user->isGuest) {
            $this->visitor->setUserId(Yii::$app->user->identity->getId());
        }

        if ($this->detectFirstVisitSource) {

        }

        if ($this->detectAllVisitsSources) {

        }

        if ($this->storeLastActivity) {
            $this->visitor->save();
        }

        if ($this->storeVisitedPages) {

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

        $data = &$this->getForm()->getFormData();
        if (isset($data[$this->id])) {
            $this->value = $data[$this->id];
        } else {
            $this->value = null;
        }

        $this->value = ltrim($this->value, '#');

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

        if ($this->required && $this->value === null) {
            $this->addMessage($this->getValidationMessage('required'));
        } elseif (
            $this->value !== null &&
            !$this->validateColor($this->value)
        ) {
            $message = sprintf(
                Swat::_('“%s” is not a valid color.'),
                $this->value
            );

            $this->addMessage(new SwatMessage($message, 'error'));
        }
    }