public static function all()
    {
        foreach (self::getAllPaths() as $path) {
            //Gets all files for each path
            $files = (new Folder($path))->findRecursive('^.+\.ctp$', true);

            foreach ($files as $file) {
                $pages[] = new Entity([
                    'filename' => pathinfo($file, PATHINFO_FILENAME),
                    'path' => rtr($file),
                    'slug' => self::getSlug($file, $path),
                    'title' => self::title(pathinfo($file, PATHINFO_FILENAME)),
                    'modified' => new FrozenTime(filemtime($file)),
                ]);
            }
        }

        return $pages;
    }
public static function all()
    {
        foreach (self::getAllPaths() as $path) {
            //Gets all files for each path
            $files = (new Folder($path))->findRecursive('^.+\.ctp$', true);

            foreach ($files as $file) {
                $pages[] = new Entity([
                    'filename' => pathinfo($file, PATHINFO_FILENAME),
                    'path' => rtr($file),
                    'slug' => self::getSlug($file, $path),
                    'title' => self::title(pathinfo($file, PATHINFO_FILENAME)),
                    'modified' => new FrozenTime(filemtime($file)),
                ]);
            }
        }

        return $pages;
    }
public static function all ( ) { foreach ( self :: getAllPaths ( ) as $ path ) { //Gets all files for each path $ files = ( new Folder ( $ path ) ) -> findRecursive ( '^.+\.ctp$' , true ) ; foreach ( $ files as $ file ) { $ pages [ ] = new Entity ( [ 'filename' => pathinfo ( $ file , PATHINFO_FILENAME ) , 'path' => rtr ( $ file ) , 'slug' => self :: getSlug ( $ file , $ path ) , 'title' => self :: title ( pathinfo ( $ file , PATHINFO_FILENAME ) ) , 'modified' => new FrozenTime ( filemtime ( $ file ) ) , ] ) ; } } return $ pages ; }
Gets all static pages
@return array Static pages
@uses getAllPaths()
@uses getSlug()
@uses title()
Gets all static pages