Пример #1
0
 /**
  * @return void
  */
 protected function buildThemeList()
 {
     $list = Collection::make();
     $default = new Theme('默认模板', 'default');
     $default->useCssPath(realpath($this->application->frameworkPath() . '/less'));
     $default->useLessPath(realpath($this->application->frameworkPath() . '/less'));
     $default->useFontPath(realpath($this->application->frameworkPath() . '/fonts'));
     $default->useImagePath(realpath($this->application->frameworkPath() . '/images/default'));
     $default->useJsPath(realpath($this->application->frameworkPath() . '/js'));
     $default->useViewPath(realpath($this->application->frameworkPath() . '/views/default'));
     $list->put('default', $default);
     $admin = new Theme('后台模板', 'admin');
     $admin->useCssPath(realpath($this->application->frameworkPath() . '/less'));
     $admin->useLessPath(realpath($this->application->frameworkPath() . '/less'));
     $admin->useFontPath(realpath($this->application->frameworkPath() . '/fonts'));
     $admin->useImagePath(realpath($this->application->frameworkPath() . '/images/admin'));
     $admin->useJsPath(realpath($this->application->frameworkPath() . '/js'));
     $admin->useViewPath(realpath($this->application->frameworkPath() . '/views/admin'));
     $list->put('admin', $admin);
     $this->application->make('events')->fire(new GetThemeList($this->application, $list));
     $this->list = $list;
 }