Example #1
0
 private function exportThemes(ZipArchive $za, $archiveDir)
 {
     $currentTheme = OW::getThemeManager()->getSelectedTheme()->getDto();
     $currentThemeDir = OW::getThemeManager()->getSelectedTheme()->getRootDir();
     $currentThemeUserfilesDir = OW_DIR_THEME_USERFILES;
     $this->configs['currentTheme'] = array('name' => $currentTheme->name, 'customCss' => $currentTheme->customCss, 'customCssFileName' => $currentTheme->customCssFileName, 'description' => $currentTheme->description, 'isActive' => $currentTheme->isActive, 'sidebarPosition' => $currentTheme->sidebarPosition, 'title' => $currentTheme->title);
     $controlValueList = OW::getDbo()->queryForList(" SELECT * FROM " . BOL_ThemeControlValueDao::getInstance()->getTableName() . " WHERE themeId = :themeId ", array('themeId' => $currentTheme->id));
     foreach ($controlValueList as $controlValue) {
         $this->configs['controlValue'][$controlValue['themeControlKey']] = $controlValue['value'];
     }
     $za->addEmptyDir($archiveDir . '/' . $currentTheme->getName());
     $this->zipFolder($za, $currentThemeDir, $archiveDir . '/' . $currentTheme->getName() . '/');
     $themesDir = Ow::getPluginManager()->getPlugin('dataexporter')->getPluginFilesDir() . 'themes' . DS;
     UTIL_File::copyDir(OW_DIR_THEME_USERFILES, $themesDir);
     $fileList = Ow::getStorage()->getFileNameList(OW_DIR_THEME_USERFILES);
     mkdir($themesDir, 0777);
     foreach ($fileList as $file) {
         if (Ow::getStorage()->isFile($file)) {
             Ow::getStorage()->copyFileToLocalFS($file, $themesDir . mb_substr($file, mb_strlen(OW_DIR_THEME_USERFILES)));
         }
     }
     $za->addEmptyDir($archiveDir . '/themes');
     $this->zipFolder($za, $themesDir, $archiveDir . '/themes/');
 }
Example #2
0
 /**
  * Constructor.
  */
 private function __construct()
 {
     $this->themeDao = BOL_ThemeDao::getInstance();
     $this->themeContentDao = BOL_ThemeContentDao::getInstance();
     $this->themeMasterPageDao = BOL_ThemeMasterPageDao::getInstance();
     $this->themeControlDao = BOL_ThemeControlDao::getInstance();
     $this->themeControlValueDao = BOL_ThemeControlValueDao::getInstance();
     $this->themeImageDao = BOL_ThemeImageDao::getInstance();
     $this->userfileImagesDir = OW_DIR_USERFILES . 'themes' . DS;
     $this->userfileImagesUrl = OW_URL_USERFILES . 'themes/';
 }
Example #3
0
 public function findThemeControls($themeId)
 {
     $query = "SELECT `c`.`id` AS `cid`, `c`.*, `cv`.* FROM `" . $this->getTableName() . "` AS `c`\n            LEFT JOIN ( SELECT * FROM `" . BOL_ThemeControlValueDao::getInstance()->getTableName() . "` WHERE `themeId` = :themeId2 )\n                AS `cv` ON (`c`.`key` = `cv`.`themeControlKey`)\n            WHERE `c`.`themeId` = :themeId ORDER BY `" . self::LABEL . "`";
     return $this->dbo->queryForList($query, array('themeId' => $themeId, 'themeId2' => $themeId));
 }
Example #4
0
 /**
  * Constructor.
  */
 private function __construct()
 {
     $this->themeDao = BOL_ThemeDao::getInstance();
     $this->themeContentDao = BOL_ThemeContentDao::getInstance();
     $this->themeMasterPageDao = BOL_ThemeMasterPageDao::getInstance();
     $this->themeControlDao = BOL_ThemeControlDao::getInstance();
     $this->themeControlValueDao = BOL_ThemeControlValueDao::getInstance();
     $this->themeImageDao = BOL_ThemeImageDao::getInstance();
 }