InvalidArgumentException {#651 #message: "Page should be an instance of `common\ActiveRecords\Page`" #code: 0 #file: "/var/www/vhosts/granulas.lv/httpdocs/frontend/classes/UrlRules/PageUrlRule.php" #line: 44 : { { ›if (!is_a($params['page'], Page::class)) {\r
›throw new \InvalidArgumentException('Page should be an instance of `' . Page::class . '`');\r
›}\r
} { ›$rule = getInstance($entry);\r
›$result = $rule->createUrl($route, $params);\r
›if ($result) {\r
: { : "page" : array:1 [ …1] } } { ›{\r
›$result = self::processUrlRules($route, $params);\r
›\r
: { : "page" : array:1 [ …1] } } { ›<?php echo getOptionValue(\common\services\OptionService::OPTION_INDEX_FIFTH_TEXT_EN); ?>\r
›<a href="<?php echo Url::get('page', ['page' => \common\ActiveRecords\Page::findByPk(getOptionValue(\common\services\OptionService::OPTION_INDEX_SIXTH_TEXT_EN))]); ?>"\r
›class="button button-primary"><?php echo \Constructor\WebApp::l('Lasīt vairāk »', []); ?></a>\r
: { : "page" : array:1 [ …1] } } { ›extract($data);\r
›require $viewPath;\r
›$html = ob_get_clean();\r
: { "/var/www/vhosts/granulas.lv/httpdocs/frontend/templates/index/index.php" } } { ›{\r
›$content = $this->renderView($view, $data);\r
›$html = $this->template->render($content);\r
: { : "index" : [] } } { ›\r
›$response = $this->render("index", []);\r
›return $response;\r
: { : "index" : [] } } {} { › ›return call_user_func_array($callable, $args);
›}
: { : array:2 [ …2] : [] } } { ›{
›return $this->getInvoker()->call($callable, $parameters);
›}
: { : array:2 [ …2] : [] } } { ›if ($beforeActionResponse === true) {\r
›$response = WebApp::$app->getContainer()->call([$this, $action], $actionParams);\r
›$this->afterAction();\r
: { : array:2 [ …2] : [] } } { ›\r
›return $controller->callAction($definition);\r
›}\r
: { : ActionDefinition {#638 …} } } { ›$this->actionDefinition = $router->route($this->request);\r
›$response = $webAction->process($this->actionDefinition);\r
›} catch (Exception $exception) {\r
: { : ActionDefinition {#638 …} } } { ›\r
›$app->run();\r
› } } }