本文整理汇总了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());
}
}
示例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();
}
示例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;
}
}
}
示例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;
}
}
}
示例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();
}
}
示例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);
}
}