Ejemplo n.º 1
0
 public function rebuild()
 {
     $flavorId = $this->flavor_folder;
     if (!$flavorId) {
         throw new \Exception('Cannot merge a theme without a flavor.');
     }
     $db = new \Core\Db();
     $moduleList = $db->select('module_id')->singleData('module_id')->from(':module')->where('is_active=1')->all();
     $css = new CSS($this);
     try {
         $data = $css->get();
         $moduleData = $css->getModule($moduleList);
         $css->reBuildModule($moduleList, $this->name);
         $appData = $css->getApp();
         $css->set($data, null, $moduleData . $appData, $this->name);
     } catch (\Exception $e) {
         if (PHPFOX_DEBUG) {
             exit("error:" . $e->getMessage());
         }
         return false;
     }
 }