コード例 #1
0
ファイル: flavor.class.php プロジェクト: nima7r/phpfox-dist
 public function process()
 {
     $Theme = (new Core\Theme())->get($this->request()->get('theme'));
     $Service = new Core\Theme\Service($Theme);
     if ($this->request()->isPost()) {
         $val = $this->request()->getArray('val');
         return $Service->flavor()->make($val);
     }
     $this->template()->setBreadcrumb('New Flavor', $this->url()->makeUrl('current'), true);
     $this->template()->assign(['Theme' => $Theme, 'flavors' => $Theme->flavors()]);
 }
コード例 #2
0
ファイル: flavor.class.php プロジェクト: lev1976g/core
 public function process()
 {
     $Theme = (new Core\Theme())->get($this->request()->get('theme'));
     $Service = new Core\Theme\Service($Theme);
     if ($this->request()->isPost()) {
         $val = $this->request()->getArray('val');
         $flavorId = $Service->flavor()->make($val);
         return ['redirect' => $this->url()->makeUrl('admincp.theme.manage', ['id' => $Theme->theme_id, 'flavor' => $flavorId])];
     }
     $this->template()->setBreadcrumb('New Flavor', $this->url()->makeUrl('current'), true);
     $this->template()->assign(['Theme' => $Theme, 'flavors' => $Theme->flavors()]);
 }