Exemplo n.º 1
0
 public function testSomethingIsTrue()
 {
     $this->assertTrue(\moduleEnabled('admin'));
     $this->assertTrue(\moduleEnabled('auth'));
     $this->assertTrue(\moduleEnabled('user'));
     $this->assertTrue(\moduleEnabled('system'));
 }
Exemplo n.º 2
0
 public function localizedPages()
 {
     $queryBuilder = $this->pages();
     if (moduleEnabled('i18n')) {
         $queryBuilder->where(function ($query) {
             $query->where('language', '=', Config::get('app.locale'))->orWhere('language', '=', '')->orWhereNull('language');
         });
     }
     return $queryBuilder;
 }
Exemplo n.º 3
0
 public function register(array $options = array())
 {
     $category = PageCategory::where('type', '=', PageCategory::PAGE)->first();
     if (moduleEnabled('i18n')) {
         $pages = $category->pages()->where(function ($query) {
             $query->where('language', '=', Config::get('app.locale'))->orWhere('language', '=', '')->orWhereNull('language');
             $query->where('visibility', '=', Page::VISIBLE);
         })->get();
     } else {
         $pages = $category->pages()->where('visibility', '=', Page::VISIBLE)->get();
     }
     Menu::make($this->menuName, function ($menu) use($pages) {
         $menu->add(trans('front::front.home'), route('home'));
         Event::fire('front::menu.load', array($menu));
         foreach ($pages as $page) {
             $options = array();
             if ($page->type == Page::LINKED) {
                 $options['target'] = '_blank';
             }
             $menu->add($page->title, $page->url)->link->attr($options);
         }
     });
     return Menu::get($this->menuName)->asUl($options['attributes']);
 }
Exemplo n.º 4
0
 public function testSomethingIsTrue()
 {
     $this->assertTrue(\moduleEnabled('front'));
     $this->assertTrue(\moduleEnabled('system'));
 }
Exemplo n.º 5
0
 public function testModuleEnabled()
 {
     $this->assertTrue(\moduleEnabled('i18n'));
     $this->assertTrue(\moduleEnabled('system'));
 }
Exemplo n.º 6
0
 public function testSomethingIsTrue()
 {
     $this->assertTrue(\moduleEnabled('product'));
 }
Exemplo n.º 7
0
 public function testSomethingIsTrue()
 {
     $this->assertTrue(\moduleEnabled('portfolio'));
     $this->assertTrue(\moduleEnabled('page'));
     $this->assertTrue(\moduleEnabled('system'));
 }
Exemplo n.º 8
0
 public function testInitialized()
 {
     $this->assertTrue(\moduleEnabled('system'));
 }