^ InvalidArgumentException {#1208 #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 : { { frontend\classes\UrlRules\PageUrlRule->createUrl(string $route, array $params = []): ?string … ›if (!is_a($params['page'], Page::class)) {
›throw new \InvalidArgumentException('Page should be an instance of `' . Page::class . '`');
›}
} { Constructor\Url::processUrlRules($route, $params) … ›$rule = getInstance($entry);
›$result = $rule->createUrl($route, $params);
›if ($result) {
: { : "page" : array:1 [ …1] } } { Constructor\Url::get($route, $params = [], $scheme = false) … ›{
›$result = self::processUrlRules($route, $params);
› : { : "page" : array:1 [ …1] } } { require … ›<?php echo getOptionValue(OptionService::OPTION_INDEX_FIFTH_TEXT_EN); ?>
›<a href="<?php echo Url::get('page', ['page' => Page::findByPk(getOptionValue(OptionService::OPTION_INDEX_SIXTH_TEXT_EN))]); ?>"
›class="button button-primary"><?php echo WebApp::l('Lasīt vairāk »', []); ?></a>
: { : "page" : array:1 [ …1] } } { Constructor\Controller->renderView(string $view, $data) … ›extract($data);
›require $viewPath;
›$html = ob_get_clean();
: { "/var/www/vhosts/granulas.lv/httpdocs/frontend/templates/index/index.php" } } { Constructor\Controller->render($view, array $data = [], int $statusCode = null) … ›{
›$content = $this->renderView($view, $data);
›$html = $this->template->render($content);
: { : "index" : [] } } { frontend\controllers\IndexController->actionIndex() … › ›$response = $this->render("index", []);
›return $response;
: { : "index" : [] } } {} { Invoker\Invoker->call($callable, array $parameters = []) … › ›return call_user_func_array($callable, $args);
›}
: { : array:2 [ …2] : [] } } { DI\Container->call($callable, array $parameters = []) … ›{
›return $this->getInvoker()->call($callable, $parameters);
›}
: { : array:2 [ …2] : [] } } { Constructor\Controller->callAction(ActionDefinition $definition): Response … ›if ($beforeActionResponse === true) {
›$response = WebApp::$app->getContainer()->call([$this, $action], $actionParams);
›$this->afterAction();
: { : array:2 [ …2] : [] } } { Constructor\WebAction->process(ActionDefinition $definition): Response … › ›return $controller->callAction($definition);
›}
: { : Constructor\structures\ActionDefinition {#1096 …} } } { Constructor\WebApp->run() … ›$this->actionDefinition = $router->route($this->request);
›$response = $webAction->process($this->actionDefinition);
›} catch (Exception $exception) {
: { : Constructor\structures\ActionDefinition {#1096 …} } } { › ›$app->run();
› } } }