コード例 #1
0
ファイル: ThemeOptions.php プロジェクト: SocietyCMS/Setting
 /**
  * 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');
 }
コード例 #2
0
ファイル: ThemeController.php プロジェクト: Houbsi/Workshop
 public function publishAssets(Theme $theme)
 {
     try {
         Artisan::call('stylist:publish', ['theme' => $theme->getName()]);
     } catch (InvalidArgumentException $e) {
     }
 }
コード例 #3
0
ファイル: Stylist.php プロジェクト: gmonte/midig-cms
 /**
  * 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()));
     }
 }
コード例 #4
0
 /**
  * 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();
 }
コード例 #5
0
 /**
  * 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.');
 }
コード例 #6
0
 /**
  * @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'));
 }