public function testSomethingIsTrue() { $this->assertTrue(\moduleEnabled('admin')); $this->assertTrue(\moduleEnabled('auth')); $this->assertTrue(\moduleEnabled('user')); $this->assertTrue(\moduleEnabled('system')); }
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; }
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']); }
public function testSomethingIsTrue() { $this->assertTrue(\moduleEnabled('front')); $this->assertTrue(\moduleEnabled('system')); }
public function testModuleEnabled() { $this->assertTrue(\moduleEnabled('i18n')); $this->assertTrue(\moduleEnabled('system')); }
public function testSomethingIsTrue() { $this->assertTrue(\moduleEnabled('product')); }
public function testSomethingIsTrue() { $this->assertTrue(\moduleEnabled('portfolio')); $this->assertTrue(\moduleEnabled('page')); $this->assertTrue(\moduleEnabled('system')); }
public function testInitialized() { $this->assertTrue(\moduleEnabled('system')); }