* @param string $className fully qualified name
* @param string[] $metaData additional meta data
*/
- public function __construct($className, array $metaData)
+ public function __construct($className, array $metaData, bool $isLandingPage)
{
$this->className = $className;
$this->metaData = $metaData;
- }
-
- /**
- * Marks this request as landing page.
- */
- public function setIsLandingPage()
- {
- $this->isLandingPage = true;
+ $this->isLandingPage = $isLandingPage;
}
/**
$this->activeRequest = new Request(
$className,
- $metaData
+ $metaData,
+ !$this->isACPRequest() && ControllerMap::getInstance()->isLandingPage($className, $metaData)
);
-
- if (!$this->isACPRequest()) {
- // determine if current request matches the landing page
- if (ControllerMap::getInstance()->isLandingPage($className, $metaData)) {
- $this->activeRequest->setIsLandingPage();
- }
- }
} catch (SystemException $e) {
if (
\defined('ENABLE_DEBUG_MODE')