Example #1
0
 public function add(PageType $pageType)
 {
     $this->pageTypes[$pageType->getId()] = $pageType;
     if (!($routeNames = $pageType->getRouteNames())) {
         return $this;
     }
     foreach ($routeNames as $routeName) {
         $this->pageTypesByRouteName[$routeName] = $pageType;
     }
     return $this;
 }
Example #2
0
 protected function registerCmsPageType()
 {
     $this->app['events']->listen('cmsable.pageTypeLoadRequested', function ($pageTypes) {
         $pageType = PageType::create('cmsable.admin-redirect')->setCategory('security')->setRouteScope('default')->setTargetPath('cms-redirect');
         $pageTypes->add($pageType);
     });
 }
Example #3
0
 protected function getLangKey(PageType $pageType)
 {
     return $this->langKey . '.' . str_replace('.', '/', $pageType->getId());
 }