當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ActionController::processRequest方法代碼示例

本文整理匯總了PHP中TYPO3\CMS\Extbase\Mvc\Controller\ActionController::processRequest方法的典型用法代碼示例。如果您正苦於以下問題:PHP ActionController::processRequest方法的具體用法?PHP ActionController::processRequest怎麽用?PHP ActionController::processRequest使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在TYPO3\CMS\Extbase\Mvc\Controller\ActionController的用法示例。


在下文中一共展示了ActionController::processRequest方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: invokeModuleController

 /**
  * Call a sub-module's controller
  *
  */
 protected function invokeModuleController()
 {
     $activeModuleDescription = $this->moduleManager->getModuleDescription($this->activeModuleName);
     $request = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Request');
     /* @var Request $request */
     $request->setControllerExtensionName(ucfirst($activeModuleDescription['extensionKey']));
     $request->setControllerName($activeModuleDescription['controller'] . 'Module');
     $request->setControllerActionName('index');
     if (!is_null($this->site)) {
         $request->setArgument('site', $this->site);
     }
     $request->setPluginName($this->request->getPluginName());
     if ($this->request->hasArgument('moduleAction')) {
         // TODO check whether action is registered/allowed
         $request->setControllerActionName($this->request->getArgument('moduleAction'));
     }
     // transfer additional parameters
     foreach ($this->request->getArguments() as $argumentName => $argumentValue) {
         if (in_array($argumentName, array('module', 'moduleAction', 'controller'))) {
             // these have been transferred already
             continue;
         }
         $request->setArgument($argumentName, $argumentValue);
     }
     $response = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Response');
     /* @var Response $response */
     while (!$request->isDispatched()) {
         try {
             $this->activeModule->processRequest($request, $response);
         } catch (StopActionException $ignoredException) {
         }
     }
     $this->view->assign('moduleContent', $response->getContent());
 }
開發者ID:kalypso63,項目名稱:ext-solr,代碼行數:38,代碼來源:AdministrationController.php

示例2: processRequest

 /**
  * Handles a request. The result output is returned by altering the given response.
  *
  * @param RequestInterface $request The request object
  * @param ResponseInterface $response The response, modified by this handler
  * @return void
  * @api
  */
 public function processRequest(RequestInterface $request, ResponseInterface $response)
 {
     if ($request instanceof WidgetRequest) {
         $this->widgetConfiguration = $request->getWidgetContext()->getWidgetConfiguration();
     }
     parent::processRequest($request, $response);
 }
開發者ID:plan2net,項目名稱:TYPO3.CMS,代碼行數:15,代碼來源:AbstractWidgetController.php

示例3: processRequest

 /**
  * @param RequestInterface $request
  * @param ResponseInterface $response
  * @throws \Exception
  */
 public function processRequest(RequestInterface $request, ResponseInterface $response)
 {
     try {
         parent::processRequest($request, $response);
     } catch (\Exception $exception) {
         $this->handleKnownExceptionsElseThrowAgain($exception);
     }
 }
開發者ID:kalypso63,項目名稱:news,代碼行數:13,代碼來源:NewsBaseController.php

示例4: processRequest

 /**
  * @param \TYPO3\CMS\Extbase\Mvc\RequestInterface $request
  * @param \TYPO3\CMS\Extbase\Mvc\ResponseInterface $response
  * @throws \RuntimeException
  */
 public function processRequest(\TYPO3\CMS\Extbase\Mvc\RequestInterface $request, \TYPO3\CMS\Extbase\Mvc\ResponseInterface $response)
 {
     try {
         parent::processRequest($request, $response);
     } catch (\TYPO3\CMS\Extbase\Property\Exception $exception) {
         throw new \RuntimeException($this->getRuntimeIdentifier() . ': ' . $exception->getMessage() . ' (' . $exception->getCode() . ')');
     }
 }
開發者ID:plan2net,項目名稱:TYPO3.CMS,代碼行數:13,代碼來源:BlogController.php

示例5: processRequest

 /**
  * Processes a general request. The result can be returned by altering the given response.
  *
  * @param RequestInterface $request The request object
  * @param ResponseInterface $response The response, modified by this handler
  */
 public function processRequest(RequestInterface $request, ResponseInterface $response)
 {
     $GLOBALS['SOBE'] = new \stdClass();
     $GLOBALS['SOBE']->doc = $this->documentTemplate;
     parent::processRequest($request, $response);
     $pageHeader = $this->documentTemplate->startpage($this->languageService->sL('LLL:EXT:typo3_forum/Resources/Private/Language/locallang_mod.xml:module.title'));
     $pageEnd = $this->documentTemplate->endPage();
     $response->setContent($pageHeader . $response->getContent() . $pageEnd);
 }
開發者ID:steffmeister,項目名稱:typo3-forum,代碼行數:15,代碼來源:AbstractBackendController.php

示例6: processRequest

 /**
  * Processes a general request. The result can be returned by altering the given response.
  *
  * @param \TYPO3\CMS\Extbase\Mvc\RequestInterface $request The request object
  * @param \TYPO3\CMS\Extbase\Mvc\ResponseInterface $response The response, modified by this handler
  * @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException if the controller doesn't support the current request type
  * @return void
  */
 public function processRequest(\TYPO3\CMS\Extbase\Mvc\RequestInterface $request, \TYPO3\CMS\Extbase\Mvc\ResponseInterface $response)
 {
     $this->template = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
     $this->pageRenderer = $this->template->getPageRenderer();
     $GLOBALS['SOBE'] = new \stdClass();
     $GLOBALS['SOBE']->doc = $this->template;
     parent::processRequest($request, $response);
     $pageHeader = $this->template->startpage($GLOBALS['LANG']->sL('LLL:EXT:workspaces/Resources/Private/Language/locallang.xlf:module.title'));
     $pageEnd = $this->template->endPage();
     $response->setContent($pageHeader . $response->getContent() . $pageEnd);
 }
開發者ID:Mr-Robota,項目名稱:TYPO3.CMS,代碼行數:19,代碼來源:AbstractController.php

示例7: processRequest

 /**
  * Load and persist module data
  *
  * @param \TYPO3\CMS\Extbase\Mvc\RequestInterface $request
  * @param \TYPO3\CMS\Extbase\Mvc\ResponseInterface $response
  * @return void
  * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
  */
 public function processRequest(\TYPO3\CMS\Extbase\Mvc\RequestInterface $request, \TYPO3\CMS\Extbase\Mvc\ResponseInterface $response)
 {
     $this->moduleData = $this->moduleDataStorageService->loadModuleData();
     // We "finally" persist the module data.
     try {
         parent::processRequest($request, $response);
         $this->moduleDataStorageService->persistModuleData($this->moduleData);
     } catch (\TYPO3\CMS\Extbase\Mvc\Exception\StopActionException $e) {
         $this->moduleDataStorageService->persistModuleData($this->moduleData);
         throw $e;
     }
 }
開發者ID:Mr-Robota,項目名稱:TYPO3.CMS,代碼行數:20,代碼來源:BackendUserController.php

示例8: processRequest

 /**
  * @param \TYPO3\CMS\Extbase\Mvc\RequestInterface $request
  * @param \TYPO3\CMS\Extbase\Mvc\ResponseInterface $response
  * @return void
  * @throws \Exception
  * @override \TYPO3\CMS\Extbase\Mvc\Controller\ActionController
  * @see http://nerdcenter.de/extbase-fehlerbehandlung/
  */
 public function processRequest(\TYPO3\CMS\Extbase\Mvc\RequestInterface $request, \TYPO3\CMS\Extbase\Mvc\ResponseInterface $response)
 {
     try {
         parent::processRequest($request, $response);
     } catch (PropertyException $exception) {
         // If the property mapper did throw a \TYPO3\CMS\Extbase\Property\Exception, because it was unable to find the requested entity, call the page-not-found handler.
         $previousException = $exception->getPrevious();
         if ($previousException instanceof PropertyTargetNotFoundException || $previousException instanceof PropertyInvalidSourceException) {
             $GLOBALS['TSFE']->pageNotFoundAndExit($this->entityNotFoundMessage);
         }
         throw $exception;
     }
 }
開發者ID:4wdmedia,項目名稱:vierwd_smarty,代碼行數:21,代碼來源:ActionController.php

示例9: processRequest

 /**
  * Load and persist module data
  *
  * @param RequestInterface $request
  * @param ResponseInterface $response
  *
  * @throws StopActionException
  * @return void
  */
 public function processRequest(RequestInterface $request, ResponseInterface $response)
 {
     /* @var $persistenceManager \TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager */
     $persistenceManager = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\PersistenceManager');
     // We "finally" persist the module data.
     try {
         parent::processRequest($request, $response);
         $persistenceManager->persistAll();
     } catch (StopActionException $e) {
         $persistenceManager->persistAll();
         throw $e;
     }
 }
開發者ID:dextar1,項目名稱:t3extblog,代碼行數:22,代碼來源:BackendBaseController.php

示例10: processRequest

 /**
  * Redirect request from post when forced
  *
  * @param \TYPO3\CMS\Extbase\Mvc\RequestInterface $request The request object
  * @param \TYPO3\CMS\Extbase\Mvc\ResponseInterface $response The response, modified by this handler
  * @return void
  */
 public function processRequest(\TYPO3\CMS\Extbase\Mvc\RequestInterface $request, \TYPO3\CMS\Extbase\Mvc\ResponseInterface $response)
 {
     parent::processRequest($request, $response);
     if ($request instanceof \TYPO3\CMS\Extbase\Mvc\Web\Request) {
         $arguments = $request->getArguments();
         if (isset($arguments['forceRedirect']) && (bool) $arguments['forceRedirect'] === true) {
             unset($arguments['forceRedirect'], $arguments['controller'], $arguments['action']);
             // Remove empty arguments
             $arguments = array_filter($arguments);
             $this->redirect($request->getControllerActionName(), null, null, $arguments);
         }
     }
 }
開發者ID:Schweriner,項目名稱:my_redirects,代碼行數:20,代碼來源:RedirectController.php

示例11: processRequest

 /**
  * @param \TYPO3\CMS\Extbase\Mvc\RequestInterface $request
  * @param \TYPO3\CMS\Extbase\Mvc\ResponseInterface $response
  * @return void
  * @throws \Exception
  * @override \TYPO3\CMS\Extbase\Mvc\Controller\ActionController
  */
 public function processRequest(\TYPO3\CMS\Extbase\Mvc\RequestInterface $request, \TYPO3\CMS\Extbase\Mvc\ResponseInterface $response)
 {
     try {
         parent::processRequest($request, $response);
     } catch (\Exception $exception) {
         if ($this->isAjax) {
             if ($this->response instanceof \TYPO3\CMS\Extbase\Mvc\Web\Response) {
                 $this->response->setStatus(500);
             }
             $this->response->appendContent($exception->getMessage());
         } else {
             throw $exception;
         }
     }
 }
開發者ID:r3h6,項目名稱:TYPO3.EXT.data_port,代碼行數:22,代碼來源:ActionController.php

示例12: processRequest

 /**
  * Adds code to the standard request processor for saving the last action.
  *
  * @param \TYPO3\CMS\Extbase\Mvc\RequestInterface $request
  * @param \TYPO3\CMS\Extbase\Mvc\ResponseInterface $response
  *
  * @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException
  */
 public function processRequest(RequestInterface $request, ResponseInterface $response)
 {
     parent::processRequest($request, $response);
     // We are here ony if the action did not throw exceptions (==successful and not forwarded). Save the action.
     $this->storeLastModuleInformation();
 }
開發者ID:teaminmedias-pluswerk,項目名稱:ke_search,代碼行數:14,代碼來源:AbstractBackendModuleController.php

示例13: processRequest

 /**
  * Handles a request. The result output is returned by altering the given response.
  *
  * @param \TYPO3\CMS\Extbase\Mvc\RequestInterface $request The request object
  * @param \TYPO3\CMS\Extbase\Mvc\ResponseInterface $response The response, modified by this handler
  * @return void
  * @api
  */
 public function processRequest(\TYPO3\CMS\Extbase\Mvc\RequestInterface $request, \TYPO3\CMS\Extbase\Mvc\ResponseInterface $response)
 {
     if (method_exists($request, 'getWidgetContext')) {
         $this->widgetConfiguration = $request->getWidgetContext()->getWidgetConfiguration();
     }
     \TYPO3\CMS\Extbase\Mvc\Controller\ActionController::processRequest($request, $response);
 }
開發者ID:raimundlandig,項目名稱:winkel.de-DEV,代碼行數:15,代碼來源:MenuController.php

示例14: processRequest

 /**
  * Fires end-of-lifecycle signal if processing backend request.
  * 
  * @see processRequest() in parent
  */
 public function processRequest(\TYPO3\CMS\Extbase\Mvc\RequestInterface $request, \TYPO3\CMS\Extbase\Mvc\ResponseInterface $response)
 {
     parent::processRequest($request, $response);
     if (TYPO3_MODE === 'BE') {
         // if we are in BE mode, this ist the last line called
         $this->lifecycleManager->updateState(Tx_PtExtbase_Lifecycle_Manager::END);
     }
 }
開發者ID:beyond-agentur,項目名稱:pt_extbase,代碼行數:13,代碼來源:AbstractActionController.php

示例15: processRequest

 /**
  * Handles a request. The result output is returned by altering the given response.
  *
  * @param \TYPO3\CMS\Extbase\Mvc\RequestInterface $request The request object
  * @param \TYPO3\CMS\Extbase\Mvc\ResponseInterface $response The response, modified by this handler
  * @return void
  * @api
  */
 public function processRequest(\TYPO3\CMS\Extbase\Mvc\RequestInterface $request, \TYPO3\CMS\Extbase\Mvc\ResponseInterface $response)
 {
     if ($request instanceof WidgetRequest) {
         $this->widgetConfiguration = $request->getWidgetContext()->getWidgetConfiguration();
     }
     ActionController::processRequest($request, $response);
 }
開發者ID:TYPO3-extensions,項目名稱:sr_language_menu,代碼行數:15,代碼來源:MenuController.php


注:本文中的TYPO3\CMS\Extbase\Mvc\Controller\ActionController::processRequest方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。