* @param string $controller url controller
* @param bool $isAcpRequest true if this is an ACP request
* @param bool $skipCustomUrls true if custom url resolution should be suppressed, is always true for ACP requests
- * @return mixed array containing className, controller and pageType or a string containing the controller name for aliased controllers
+ * @return mixed array containing className and controller or a string containing the controller name for aliased controllers
* @throws SystemException
*/
public function resolve($application, $controller, $isAcpRequest, $skipCustomUrls = false)
return [
'className' => CmsPage::class,
'controller' => 'cms',
- 'pageType' => 'page',
// CMS page meta data
'cmsPageID' => $matches['pageID'],
return [
'className' => $data,
'controller' => $matches[1],
- 'pageType' => \strtolower($matches[2]),
];
}
}
* @param string $application application identifier
* @param string $controller controller name
* @param bool $isAcpRequest true if this is an ACP request
- * @return string[]|null className, controller and pageType, or null if this is not a legacy controller name
+ * @return string[]|null className and controller, or null if this is not a legacy controller name
*/
protected function getLegacyClassData($application, $controller, $isAcpRequest)
{
if (isset($this->ciControllers['lookup'][$application][$environment][$controller])) {
$className = $this->ciControllers['lookup'][$application][$environment][$controller];
- if (\preg_match('~\\\\(?P<controller>[^\\\\]+)(?P<pageType>Action|Form|Page)$~', $className, $matches)) {
+ if (\preg_match('~\\\\(?P<controller>[^\\\\]+)(Action|Form|Page)$~', $className, $matches)) {
return [
'className' => $className,
'controller' => $matches['controller'],
- 'pageType' => \strtolower($matches['pageType']),
];
}
}
* @param string $controller controller name
* @param bool $isAcpRequest true if this is an ACP request
* @param string $pageType page type, e.g. 'form' or 'action'
- * @return string[]|null className, controller and pageType
+ * @return string[]|null className and controller
*/
protected function getClassData($application, $controller, $isAcpRequest, $pageType)
{
return [
'className' => $className,
'controller' => $controller,
- 'pageType' => $pageType,
];
}
*/
protected $pageName = '';
- /**
- * page type
- * @var string
- */
- protected $pageType = '';
-
/**
* request object
* @var object
*
* @param string $className fully qualified name
* @param string $pageName class name
- * @param string $pageType can be 'action', 'form' or 'page'
* @param string[] $metaData additional meta data
*/
- public function __construct($className, $pageName, $pageType, array $metaData)
+ public function __construct($className, $pageName, array $metaData)
{
$this->className = $className;
$this->metaData = $metaData;
$this->pageName = $pageName;
- $this->pageType = $pageType;
}
/**
return $this->pageName;
}
- /**
- * Returns the page type of this request.
- *
- * @return string
- */
- public function getPageType()
- {
- return $this->pageType;
- }
-
/**
* Returns the current request object.
*
$classData = [
'className' => $routeData['className'],
'controller' => $routeData['controller'],
- 'pageType' => $routeData['pageType'],
];
unset($routeData['className']);
unset($routeData['controller']);
- unset($routeData['pageType']);
} else {
if (
$this->isACPRequest()
$this->activeRequest = new Request(
$classData['className'],
$classData['controller'],
- $classData['pageType'],
$metaData
);