当前位置: 首页>>代码示例>>PHP>>正文


PHP ActionController::callActionMethod方法代码示例

本文整理汇总了PHP中TYPO3\CMS\Extbase\Mvc\Controller\ActionController::callActionMethod方法的典型用法代码示例。如果您正苦于以下问题:PHP ActionController::callActionMethod方法的具体用法?PHP ActionController::callActionMethod怎么用?PHP ActionController::callActionMethod使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TYPO3\CMS\Extbase\Mvc\Controller\ActionController的用法示例。


在下文中一共展示了ActionController::callActionMethod方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: callActionMethod

 /**
  * Calls the specified action method and passes the arguments.
  *
  * If the action returns a string, it is appended to the content in the
  * response object. If the action doesn't return anything and a valid
  * view exists, the view is rendered automatically.
  *
  * @return void
  * @api
  */
 protected function callActionMethod()
 {
     parent::callActionMethod();
     if (isset($this->feedFormats[$this->request->getFormat()])) {
         $this->sendHeaderAndFilename($this->feedFormats[$this->request->getFormat()], $this->request->getFormat());
     }
 }
开发者ID:mkalus,项目名称:calendarize,代码行数:17,代码来源:AbstractController.php

示例2: callActionMethod

 /**
  * @api
  */
 public function callActionMethod()
 {
     try {
         parent::callActionMethod();
     } catch (NotFoundException $e) {
         $this->cleanupAction();
         $this->getGlobals()->getFrontendController()->pageNotFoundAndExit($e->getMessage());
     } catch (\Exception $e) {
         $this->cleanupAction();
         throw $e;
     }
     $this->cleanupAction();
 }
开发者ID:bash,项目名称:Sugar,代码行数:16,代码来源:ActionController.php

示例3: callActionMethod

 /**
  * @return void
  * @override \TYPO3\CMS\Extbase\Mvc\Controller\ActionController
  */
 protected function callActionMethod()
 {
     try {
         parent::callActionMethod();
     } 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,代码行数:19,代码来源:ActionController.php

示例4: callActionMethod

 /**
  * @return void
  * @override \TYPO3\CMS\Extbase\Mvc\Controller\ActionController
  */
 protected function callActionMethod()
 {
     try {
         parent::callActionMethod();
     } catch (\TYPO3\CMS\Extbase\Mvc\Exception\StopActionException $exception) {
         throw $exception;
     } catch (\Exception $exception) {
         \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($exception);
         if ($this->isAjax) {
             $output = $exception->getMessage();
             if ($this->response instanceof \TYPO3\CMS\Extbase\Mvc\Web\Response) {
                 $this->response->setStatus(500);
             }
             $this->response->appendContent($output);
         } else {
             throw $exception;
         }
     }
 }
开发者ID:r3h6,项目名称:TYPO3.EXT.frp_example,代码行数:23,代码来源:ActionController.php

示例5: callActionMethod

 /**
  * Handles all exceptions thrown inside the application
  */
 protected function callActionMethod()
 {
     try {
         parent::callActionMethod();
     } catch (Exception $exception) {
         if ($exception instanceof \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException) {
             throw $exception;
         }
         header('HTTP/1.1 500 Internal Server Error', true, 500);
         $this->response->setContent($exception->getCode());
         if ($exception instanceof \PunktDe\PtExtbase\Exception\LoggerException) {
             $this->logger->log($exception->getLogLevel(), sprintf('%s (%s)', $exception->getMessage(), $exception->getCode()), get_class($this));
         } else {
             $this->logger->error(sprintf('%s (%s)', $exception->getMessage(), $exception->getCode()), get_class($this));
         }
         $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\PersistenceManager')->persistAll();
         $this->cleanUpAtException($exception);
         return $exception->getCode();
     }
 }
开发者ID:punktde,项目名称:pt_extbase,代码行数:23,代码来源:AbstractApiController.php

示例6: callActionMethod

 /**
  *
  * Calls a controller action. This method wraps the callActionMethod method of
  * the parent Tx_Extbase_MVC_Controller_ActionController class. It catches all
  * Exceptions that might be thrown inside one of the action methods.
  * This method ONLY catches exceptions that belong to the typo3_forum extension.
  * All other exceptions are not caught.
  *
  * @return void
  *
  */
 protected function callActionMethod()
 {
     try {
         parent::callActionMethod();
     } catch (AbstractException $e) {
         $this->handleError($e);
     }
 }
开发者ID:steffmeister,项目名称:typo3-forum,代码行数:19,代码来源:AbstractController.php


注:本文中的TYPO3\CMS\Extbase\Mvc\Controller\ActionController::callActionMethod方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。