Page\Controller\IndexController::indexAction PHP Method

indexAction() public method

public indexAction ( )
    public function indexAction()
    {
        $slug = $this->dispatcher->getParam('slug', 'string');
        $pageHelper = new PageHelper();
        $pageResult = $pageHelper->pageBySlug($slug);
        if (!$pageResult) {
            throw new Exception("Page '{$slug}.html' not found");
        }
        $this->helper->title()->append($pageResult->meta_title);
        $this->helper->meta()->set('description', $pageResult->meta_description);
        $this->helper->meta()->set('keywords', $pageResult->meta_keywords);
        $this->view->text = $pageResult->text;
    }