Пример #1
0
 public function __construct()
 {
     $this->parser = App::make('theme.parser');
     $this->skin = Helper::skin();
     $this->start = Config::get('theme::start');
     $this->layout = Helper::layout();
 }
Пример #2
0
 public function __construct(\Assetic\AssetManager $am, \Illuminate\Foundation\Application $app)
 {
     $this->am =& $am;
     $this->app = $app;
     $this->skin = Helper::skin();
     $this->config = $this->app['config']->get('theme::theme.' . $this->skin);
     $this->path = $this->config['assets_path'];
     $this->init();
 }
Пример #3
0
 public function boot()
 {
     $this->package('onefasteuro/theme');
     $skin = Helper::skin();
     $main = $this->app['config']->get('theme::start');
     View::addNamespace('theme.content', app_path() . '/' . $main['content_folder']);
     View::addNamespace('theme.views', app_path() . '/' . $main['views_folder']);
     View::creator('theme.views::' . $skin . '.*', function ($view) use($skin) {
         $s = Request::segments();
         if (count($s) < 1) {
             $class[] = 'home';
         } else {
             $class[] = implode('-', $s);
         }
         $view->body_class = implode(' ', $class);
         $view->body = NULL;
         $view->skin = $skin;
     });
 }