當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。