Exemple #1
0
 /**
  * Method that returns static pages urls
  * @return array
  * @uses MeCms\Utility\SitemapBuilder::parse()
  * @uses MeCms\Utility\StaticPage::all()
  */
 public static function staticPages()
 {
     $statics = \MeCms\Utility\StaticPage::all();
     //Adds static pages
     $url = array_map(function ($page) {
         return self::parse(['_name' => 'page', $page->slug], ['lastmod' => $page->modified]);
     }, $statics);
     return $url;
 }
 /**
  * List static pages.
  *
  * Static pages must be located in `APP/View/StaticPages/`.
  * @return void
  * @uses MeCms\Utility\StaticPage::all()
  */
 public function indexStatics()
 {
     $this->set('pages', StaticPage::all());
 }