/** * Get the options defined in the themes json file. * * @return mixed */ public function getOptions() { if ($this->options) { return $this->options; } return $this->options = (new \FloatingPoint\Stylist\Theme\Json($this->theme->getPath()))->getJsonAttribute('options'); }
public function publishAssets(Theme $theme) { try { Artisan::call('stylist:publish', ['theme' => $theme->getName()]); } catch (InvalidArgumentException $e) { } }
/** * Activates the view finder paths for a theme and its parents. * * @param Theme $theme */ protected function activateFinderPaths(Theme $theme) { $this->view->addLocation($theme->getPath() . '/views/'); if ($theme->hasParent()) { $this->activateFinderPaths($this->get($theme->getParent())); } }
/** * 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')); }