当前位置: 首页>>代码示例>>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;未经允许,请勿转载。