本文整理匯總了PHP中TYPO3\CMS\Extbase\Mvc\Controller\ActionController::resolveActionMethodName方法的典型用法代碼示例。如果您正苦於以下問題:PHP ActionController::resolveActionMethodName方法的具體用法?PHP ActionController::resolveActionMethodName怎麽用?PHP ActionController::resolveActionMethodName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類TYPO3\CMS\Extbase\Mvc\Controller\ActionController
的用法示例。
在下文中一共展示了ActionController::resolveActionMethodName方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: resolveActionMethodName
/**
* @inheritdoc
*/
protected function resolveActionMethodName()
{
$this->mapRawGetData();
if ($this->request->getControllerActionName() === 'index') {
$actionName = 'index';
switch ($this->request->getMethod()) {
case 'HEAD':
case 'GET':
$actionName = $this->request->hasArgument($this->resourceArgumentName) && $this->request->getArgument($this->resourceArgumentName) !== '' ? 'show' : 'list';
break;
}
$contentObject = $this->configurationManager->getContentObject();
if ($contentObject->getUserObjectType() === ContentObjectRenderer::OBJECTTYPE_USER_INT) {
switch ($this->request->getMethod()) {
case 'POST':
$actionName = 'create';
break;
case 'PUT':
if (!$this->request->hasArgument($this->resourceArgumentName)) {
$this->throwStatus(400, null, 'No resource specified');
}
$actionName = 'update';
break;
case 'DELETE':
if (!$this->request->hasArgument($this->resourceArgumentName)) {
$this->throwStatus(400, null, 'No resource specified');
}
$actionName = 'delete';
break;
}
}
$this->request->setControllerActionName($actionName);
}
return parent::resolveActionMethodName();
}