Beispiel #1
0
 public function __construct(Request $request)
 {
     parent::__construct($request);
     $this->theme = Theme::byRequest();
     $this->theme->register($this->is_auth);
     $this->globalViewParams = ['site_locale' => $this->localeCode, 'site_version' => appVersion(), 'site_name' => appName(), 'site_logo' => appLogo(), 'site_keywords' => appKeywords(), 'site_short_name' => appShortName(), 'site_description' => appDescription(), 'site_author' => appAuthor(), 'site_email' => appEmail(), 'site_domain' => appDomain(), 'site_home_url' => homeUrl(), 'is_auth' => $this->is_auth, 'auth_user' => $this->auth_user, 'session_id' => $request->session()->getId()];
     foreach ($this->globalViewParams as $key => $value) {
         view()->share($key, $value);
     }
 }
Beispiel #2
0
 protected function __construct($type)
 {
     $this->name = $this::NAME;
     $this->view = $this::VIEW;
     $this->type = $type;
     $this->viewPath = empty($type) ? $this->view . '.' : $this->type . '.' . $this->view . '.';
     $this->assetPath = empty($type) ? 'assets/' . $this->view . '/' : 'assets/' . $this->type . '/' . $this->view . '/';
     $this->header = new TextQueue();
     $this->footer = new TextQueue();
     $this->libJsQueue = new JsQueue();
     $this->extJsQueue = new JsQueue();
     $this->libCssQueue = new CssQueue();
     $this->extCssQueue = new CssQueue();
     $this->titleRoot = appName();
     $this->title = appName();
     $this->description = appDescription();
     $this->applicationName = appName();
     $this->author = appAuthor() . ' (' . appEmail() . ')';
     $this->generator = frameworkVersion();
     $this->keywords = appKeywords();
 }