示例#1
0
 public function testSomethingIsTrue()
 {
     $this->assertTrue(\moduleEnabled('admin'));
     $this->assertTrue(\moduleEnabled('auth'));
     $this->assertTrue(\moduleEnabled('user'));
     $this->assertTrue(\moduleEnabled('system'));
 }
示例#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;
 }
示例#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']);
 }
示例#4
0
 public function testSomethingIsTrue()
 {
     $this->assertTrue(\moduleEnabled('front'));
     $this->assertTrue(\moduleEnabled('system'));
 }
示例#5
0
 public function testModuleEnabled()
 {
     $this->assertTrue(\moduleEnabled('i18n'));
     $this->assertTrue(\moduleEnabled('system'));
 }
示例#6
0
 public function testSomethingIsTrue()
 {
     $this->assertTrue(\moduleEnabled('product'));
 }
示例#7
0
 public function testSomethingIsTrue()
 {
     $this->assertTrue(\moduleEnabled('portfolio'));
     $this->assertTrue(\moduleEnabled('page'));
     $this->assertTrue(\moduleEnabled('system'));
 }
示例#8
0
 public function testInitialized()
 {
     $this->assertTrue(\moduleEnabled('system'));
 }