Exemple #1
0
 public function publishAssets(Theme $theme)
 {
     try {
         Artisan::call('stylist:publish', ['theme' => $theme->getName()]);
     } catch (InvalidArgumentException $e) {
     }
 }
Exemple #2
0
 /**
  * Register a new theme based on its path. An optional
  * parameter allows the theme to be activated as soon as its registered.
  *
  * @param Theme $theme
  * @param bool $activate
  */
 public function register(Theme $theme, $activate = false)
 {
     if (!$this->has($theme->getName())) {
         $this->themes[] = $theme;
     }
     if ($activate) {
         $this->activate($theme);
     }
 }
 /**
  * Check if the theme is active based on its type.
  *
  * @param Theme $theme
  *
  * @return bool
  */
 private function getStatus(Theme $theme)
 {
     if ($theme->type !== 'Backend') {
         return setting('core::template') === $theme->getName();
     }
     return config('society.core.core.admin-theme') === $theme->getName();
 }
 /**
  * Publish a single theme's assets.
  *
  * @param Theme $theme
  */
 protected function publishSingle(Theme $theme)
 {
     $themePath = public_path('themes/' . $theme->getAssetPath());
     $this->laravel['files']->copyDirectory($theme->getPath() . '/assets/', $themePath);
     $this->info($theme->getName() . ' assets published.');
 }
 /**
  * @param Theme $theme
  * @return \Illuminate\View\View
  */
 public function show(Theme $theme)
 {
     Breadcrumbs::addCrumb(trans('workshop::themes.viewing theme', ['theme' => $theme->getName()]));
     return view('workshop::admin.themes.show', compact('theme'));
 }