src/Page/PageFactory.php
public function make(string $slug, string $title): PageInterface
    {
        $view = (new PageView($this->view))
            ->setTheme('themosis.pages')
            ->setLayout('default')
            ->setView('page');

        $page = new Page($this->action, $this->filter, $view, new PageSettingsRepository(), $this->validator);
        $page->setSlug($slug)
            ->setTitle($title)
            ->setMenu($title);

        // Store page instance within the service container.
        $this->view->getContainer()->instance($this->prefix.'.'.$page->getSlug(), $page);

        return $page;
    }
public function make(string $slug, string $title): PageInterface
    {
        $view = (new PageView($this->view))
            ->setTheme('themosis.pages')
            ->setLayout('default')
            ->setView('page');

        $page = new Page($this->action, $this->filter, $view, new PageSettingsRepository(), $this->validator);
        $page->setSlug($slug)
            ->setTitle($title)
            ->setMenu($title);

        // Store page instance within the service container.
        $this->view->getContainer()->instance($this->prefix.'.'.$page->getSlug(), $page);

        return $page;
    }
public function make ( string $ slug , string $ title ) : PageInterface { $ view = ( new PageView ( $ this -> view ) ) -> setTheme ( 'themosis.pages' ) -> setLayout ( 'default' ) -> setView ( 'page' ) ; $ page = new Page ( $ this -> action , $ this -> filter , $ view , new PageSettingsRepository ( ) , $ this -> validator ) ; $ page -> setSlug ( $ slug ) -> setTitle ( $ title ) -> setMenu ( $ title ) ; // Store page instance within the service container. $ this -> view -> getContainer ( ) -> instance ( $ this -> prefix . '.' . $ page -> getSlug ( ) , $ page ) ; return $ page ; }
Make a new page instance.

@param string $slug
@param string $title

@return PageInterface
Make a new page instance .