framework/RedKiteCms/Content/PageCollection/PagesCollectionParser.php
public function parse()
    {
        $finder = new Finder();
        $pages = $finder->directories()->depth(0)->sortByName()->in($this->pagesDir);
        $languages = $this->configurationHandler->languages();
        $homepage = $this->configurationHandler->homepage();
        foreach ($pages as $page) {
            $pageDir = (string)$page;
            $pageName = basename($pageDir);
            $pageDefinitionFile = $pageDir . '/' . $this->pageFile;
            if (!file_exists($pageDefinitionFile)) {
                continue;
            }

            $seoDefinition = $this->fetchSeoDefinition($this->pagesDir . '/' . $pageName, $this->seoFile, $languages);
            $pageDefinition = json_decode(file_get_contents($pageDefinitionFile), true);
            $pageDefinition["seo"] = $seoDefinition;
            $pageDefinition["isHome"] = $homepage == $pageName;

            $this->pages[$pageName] = $pageDefinition;
        }

        return $this;
    }
public function parse()
    {
        $finder = new Finder();
        $pages = $finder->directories()->depth(0)->sortByName()->in($this->pagesDir);
        $languages = $this->configurationHandler->languages();
        $homepage = $this->configurationHandler->homepage();
        foreach ($pages as $page) {
            $pageDir = (string)$page;
            $pageName = basename($pageDir);
            $pageDefinitionFile = $pageDir . '/' . $this->pageFile;
            if (!file_exists($pageDefinitionFile)) {
                continue;
            }

            $seoDefinition = $this->fetchSeoDefinition($this->pagesDir . '/' . $pageName, $this->seoFile, $languages);
            $pageDefinition = json_decode(file_get_contents($pageDefinitionFile), true);
            $pageDefinition["seo"] = $seoDefinition;
            $pageDefinition["isHome"] = $homepage == $pageName;

            $this->pages[$pageName] = $pageDefinition;
        }

        return $this;
    }
public function parse ( ) { $ finder = new Finder ( ) ; $ pages = $ finder -> directories ( ) -> depth ( 0 ) -> sortByName ( ) -> in ( $ this -> pagesDir ) ; $ languages = $ this -> configurationHandler -> languages ( ) ; $ homepage = $ this -> configurationHandler -> homepage ( ) ; foreach ( $ pages as $ page ) { $ pageDir = ( string ) $ page ; $ pageName = basename ( $ pageDir ) ; $ pageDefinitionFile = $ pageDir . '/' . $ this -> pageFile ; if ( ! file_exists ( $ pageDefinitionFile ) ) { continue ; } $ seoDefinition = $ this -> fetchSeoDefinition ( $ this -> pagesDir . '/' . $ pageName , $ this -> seoFile , $ languages ) ; $ pageDefinition = json_decode ( file_get_contents ( $ pageDefinitionFile ) , true ) ; $ pageDefinition [ "seo" ] = $ seoDefinition ; $ pageDefinition [ "isHome" ] = $ homepage == $ pageName ; $ this -> pages [ $ pageName ] = $ pageDefinition ; } return $ this ; }
Parses the page to retrieve their definitions

@return $this
Parses the page to retrieve their definitions