BxBaseStudioDesigner.php 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612
  1. <?php defined('BX_DOL') or die('hack attempt');
  2. /**
  3. * Copyright (c) UNA, Inc - https://una.io
  4. * MIT License - https://opensource.org/licenses/MIT
  5. *
  6. * @defgroup UnaView UNA Studio Representation classes
  7. * @ingroup UnaStudio
  8. * @{
  9. */
  10. class BxBaseStudioDesigner extends BxDolStudioDesigner
  11. {
  12. protected $sLogoFormId = 'adm-dsg-logo-form';
  13. protected $sLogoIframeId = 'adm-dsg-logo-iframe';
  14. protected $sIconFormId = 'adm-dsg-icon-form';
  15. protected $sIconIframeId = 'adm-dsg-icon-iframe';
  16. protected $sCoverFormId = 'adm-dsg-cover-form';
  17. protected $sCoverIframeId = 'adm-dsg-cover-iframe';
  18. protected $sCoverStorage = BX_DOL_STORAGE_OBJ_IMAGES;
  19. protected $sCoverTranscoder = 'sys_cover_preview';
  20. protected $sSplashFormId = 'adm-dsg-splash-form';
  21. protected $sSplashIframeId = 'adm-dsg-splash-iframe';
  22. protected $sSplashEditorId = 'adm-dsg-splash-editor';
  23. protected $sInjectionsFormId = 'adm-dsg-injections-form';
  24. protected $sInjectionsIframeId = 'adm-dsg-injections-iframe';
  25. protected $sInjectionsEditorId = 'adm-dsg-injections-editor';
  26. public function __construct($sPage = '')
  27. {
  28. parent::__construct($sPage);
  29. $this->aPageCss = array_merge($this->aPageCss, ['forms.css', 'designer.css']);
  30. $this->aPageJs = array_merge($this->aPageJs, ['designer.js']);
  31. $this->sPageJsClass = 'BxDolStudioDesigner';
  32. $this->sPageJsObject = 'oBxDolStudioDesigner';
  33. }
  34. public function getPageJsCode($aOptions = array(), $bWrap = true)
  35. {
  36. $aOptions = array_merge([
  37. 'sActionUrl' => $this->sManageUrl,
  38. 'sParamPrefix' => $this->sParamPrefix
  39. ], $aOptions);
  40. return parent::getPageJsCode($aOptions, $bWrap);
  41. }
  42. public function getPageMenu($aMenu = array(), $aMarkers = array())
  43. {
  44. $sJsObject = $this->getPageJsObject();
  45. $aMenu = array();
  46. $aMenuItems = array(
  47. BX_DOL_STUDIO_DSG_TYPE_GENERAL => array('icon' => 'globe'),
  48. BX_DOL_STUDIO_DSG_TYPE_LOGO => array('icon' => 'pencil-alt'),
  49. BX_DOL_STUDIO_DSG_TYPE_ICON => array('icon' => 'far image'),
  50. BX_DOL_STUDIO_DSG_TYPE_COVER => array('icon' => 'far file-image'),
  51. BX_DOL_STUDIO_DSG_TYPE_SPLASH => array('icon' => 'far file-image'),
  52. BX_DOL_STUDIO_DSG_TYPE_INJECTIONS => array('icon' => 'object-group'),
  53. BX_DOL_STUDIO_DSG_TYPE_SETTINGS => array('icon' => 'cogs'),
  54. );
  55. foreach($aMenuItems as $sMenuItem => $aItem)
  56. $aMenu[] = array(
  57. 'name' => $sMenuItem,
  58. 'icon' => $aItem['icon'],
  59. 'link' => BX_DOL_URL_STUDIO . 'designer.php?page=' . $sMenuItem,
  60. 'title' => _t('_adm_lmi_cpt_' . $sMenuItem),
  61. 'selected' => $sMenuItem == $this->sPage
  62. );
  63. return parent::getPageMenu($aMenu);
  64. }
  65. protected function getGeneral()
  66. {
  67. $sJsObject = $this->getPageJsObject();
  68. $oTemplate = BxDolStudioTemplate::getInstance();
  69. $sResult = '';
  70. $sTemplate = getParam('template');
  71. $aTemplates = get_templates_array(true, false);
  72. $aTmplVarsTemplates = array ();
  73. foreach($aTemplates as $sUri => $aTemplate) {
  74. $sIcon = $this->getModuleIcon($aTemplate, 'store');
  75. $bIcon = strpos($sIcon, '.') === false && strcmp(substr($sIcon, 0, 10), 'data:image') != 0;
  76. $aTmplVarsTemplates[] = array(
  77. 'uri' => $sUri,
  78. 'title' => htmlspecialchars_adv($aTemplate['title']),
  79. 'version' => htmlspecialchars_adv($aTemplate['version']),
  80. 'vendor' => htmlspecialchars_adv($aTemplate['vendor']),
  81. 'bx_if:icon' => array (
  82. 'condition' => $bIcon,
  83. 'content' => array('icon' => $sIcon),
  84. ),
  85. 'bx_if:image' => array (
  86. 'condition' => !$bIcon,
  87. 'content' => array('icon_url' => $sIcon),
  88. ),
  89. 'bx_if:default' => array (
  90. 'condition' => $sUri == $sTemplate,
  91. 'content' => array (),
  92. ),
  93. 'bx_if:make_default' => array (
  94. 'condition' => $sUri != $sTemplate,
  95. 'content' => array(
  96. 'js_object' => $sJsObject,
  97. 'uri' => $sUri
  98. ),
  99. )
  100. );
  101. }
  102. $sContent = $sResult ? MsgBox($sResult, 10) : '';
  103. $sContent .= $oTemplate->parseHtmlByName('templates.html', array(
  104. 'bx_repeat:templates' => $aTmplVarsTemplates,
  105. ));
  106. return $oTemplate->parseHtmlByName('designer.html', array(
  107. 'content' => $sContent,
  108. 'js_content' => $this->getPageJsCode()
  109. ));
  110. }
  111. protected function getLogo()
  112. {
  113. $sJsObject = $this->getPageJsObject();
  114. $oTemplate = BxDolStudioTemplate::getInstance();
  115. $aForm = array(
  116. 'form_attrs' => array(
  117. 'id' => $this->sLogoFormId,
  118. 'name' => $this->sLogoFormId,
  119. 'action' => $this->sManageUrl,
  120. 'method' => 'post',
  121. 'enctype' => 'multipart/form-data',
  122. 'target' => $this->sLogoIframeId
  123. ),
  124. 'params' => array(
  125. 'db' => array(
  126. 'table' => '',
  127. 'key' => '',
  128. 'uri' => '',
  129. 'uri_title' => '',
  130. 'submit_name' => 'save'
  131. ),
  132. ),
  133. 'inputs' => array(
  134. 'page' => array(
  135. 'type' => 'hidden',
  136. 'name' => 'page',
  137. 'value' => $this->sPage
  138. ),
  139. 'image' => array(
  140. 'type' => 'image_uploader',
  141. 'name' => 'image',
  142. 'caption' => _t('_adm_dsg_txt_upload_image'),
  143. 'caption_preview' => _t('_adm_dsg_txt_upload_image_preview'),
  144. 'ajax_action_delete' => $sJsObject . '.deleteLogo()',
  145. 'storage_object' => 'sys_images_custom',
  146. 'value' => (int)getParam($this->sParamLogo),
  147. ),
  148. 'mark' => array(
  149. 'type' => 'image_uploader',
  150. 'name' => 'mark',
  151. 'caption' => _t('_adm_dsg_txt_upload_mark'),
  152. 'caption_preview' => _t('_adm_dsg_txt_upload_mark_preview'),
  153. 'ajax_action_delete' => $sJsObject . '.deleteMark()',
  154. 'storage_object' => 'sys_images_custom',
  155. 'value' => '',
  156. ),
  157. 'alt' => array(
  158. 'type' => 'text',
  159. 'name' => 'alt',
  160. 'caption' => _t('_adm_dsg_txt_alt_text'),
  161. 'info' => _t('_adm_dsg_dsc_alt_text'),
  162. 'value' => getParam($this->sParamLogoAlt),
  163. 'checker' => array(
  164. 'func' => '',
  165. 'params' => array(),
  166. 'error' => ''
  167. ),
  168. 'db' => array (
  169. 'pass' => 'Xss',
  170. ),
  171. ),
  172. 'save' => array(
  173. 'type' => 'submit',
  174. 'name' => 'save',
  175. 'value' => _t('_adm_btn_designer_submit'),
  176. )
  177. )
  178. );
  179. if(!empty($this->sParamMark))
  180. $aForm['inputs']['mark']['value'] = (int)getParam($this->sParamMark);
  181. else
  182. unset($aForm['inputs']['mark']);
  183. $oForm = new BxTemplStudioFormView($aForm);
  184. $oForm->initChecker();
  185. if($oForm->isSubmittedAndValid()) {
  186. echo $this->submitLogo($oForm);
  187. exit;
  188. }
  189. return MsgBox(_t('_adm_dsg_txt_logo_redefinition')) . $oTemplate->parseHtmlByName('designer.html', array(
  190. 'content' => $oTemplate->parseHtmlByName('dsr_logo.html', array('logo_iframe_id' => $this->sLogoIframeId, 'form' => $oForm->getCode())),
  191. 'js_content' => $this->getPageJsCode()
  192. ));
  193. }
  194. protected function getIcon()
  195. {
  196. $oTemplate = BxDolStudioTemplate::getInstance();
  197. $sPreview = "";
  198. $aTmplVars = array('bx_repeat:images' => array());
  199. if(($iId = (int)getParam('sys_site_icon')) != 0) {
  200. $aTranscoders = array(
  201. BX_DOL_TRANSCODER_OBJ_ICON_APPLE => '_adm_dsg_txt_icon_apple',
  202. BX_DOL_TRANSCODER_OBJ_ICON_FACEBOOK => '_adm_dsg_txt_icon_facebook',
  203. BX_DOL_TRANSCODER_OBJ_ICON_FAVICON => '_adm_dsg_txt_icon_favicon'
  204. );
  205. foreach($aTranscoders as $sTranscoder => $sTitle) {
  206. $oTranscoder = BxDolTranscoderImage::getObjectInstance($sTranscoder);
  207. $sImageUrl = $oTranscoder->getFileUrl($iId);
  208. if($sImageUrl === false) {
  209. setParam('sys_site_icon', 0);
  210. break;
  211. }
  212. $aFilterParams = $oTranscoder->getFilterParams('Resize');
  213. $bFilterWidth = !empty($aFilterParams['w']);
  214. $bFilterHeight = !empty($aFilterParams['h']);
  215. $aTmplVars['bx_repeat:images'][] = array(
  216. 'caption' => _t($sTitle),
  217. 'url' => $sImageUrl,
  218. 'bx_if:show_width' => array(
  219. 'condition' => $bFilterWidth,
  220. 'content' => array(
  221. 'width' => $bFilterWidth ? (int)$aFilterParams['w'] : 0
  222. )
  223. ),
  224. 'bx_if:show_height' => array(
  225. 'condition' => $bFilterHeight,
  226. 'content' => array(
  227. 'height' => $bFilterHeight ? (int)$aFilterParams['h'] : 0
  228. )
  229. ),
  230. );
  231. }
  232. $sPreview = $oTemplate->parseHtmlByName('dsr_icon_preview.html', $aTmplVars);
  233. }
  234. $aForm = array(
  235. 'form_attrs' => array(
  236. 'id' => $this->sIconFormId,
  237. 'name' => $this->sIconFormId,
  238. 'action' => BX_DOL_URL_STUDIO . 'designer.php',
  239. 'method' => 'post',
  240. 'enctype' => 'multipart/form-data',
  241. 'target' => $this->sIconIframeId
  242. ),
  243. 'params' => array(
  244. 'db' => array(
  245. 'table' => '',
  246. 'key' => '',
  247. 'uri' => '',
  248. 'uri_title' => '',
  249. 'submit_name' => 'save'
  250. ),
  251. ),
  252. 'inputs' => array(
  253. 'page' => array(
  254. 'type' => 'hidden',
  255. 'name' => 'page',
  256. 'value' => $this->sPage
  257. ),
  258. 'preview' => array(
  259. 'type' => 'custom',
  260. 'name' => 'preview',
  261. 'content' => $sPreview
  262. ),
  263. 'image' => array(
  264. 'type' => 'file',
  265. 'name' => 'image',
  266. 'caption' => _t('_adm_dsg_txt_upload_icon')
  267. ),
  268. 'save' => array(
  269. 'type' => 'submit',
  270. 'name' => 'save',
  271. 'value' => _t('_adm_btn_designer_submit'),
  272. )
  273. )
  274. );
  275. $oForm = new BxTemplStudioFormView($aForm);
  276. $oForm->initChecker();
  277. if($oForm->isSubmittedAndValid()) {
  278. echo $this->submitIcon($oForm);
  279. exit;
  280. }
  281. return $oTemplate->parseHtmlByName('designer.html', array(
  282. 'content' => $oTemplate->parseHtmlByName('dsr_icon.html', array('icon_iframe_id' => $this->sIconIframeId, 'form' => $oForm->getCode())),
  283. 'js_content' => $this->getPageJsCode()
  284. ));
  285. }
  286. protected function getCover()
  287. {
  288. $sJsObject = $this->getPageJsObject();
  289. $oTemplate = BxDolStudioTemplate::getInstance();
  290. $oDbSettings = new BxDolStudioSettingsQuery();
  291. $aFormInputs = array();
  292. $aTmplVarsCovers = array();
  293. foreach($this->aCovers as $sCover => $aCover) {
  294. $aSetting = array();
  295. $oDbSettings->getOptions(array('type' => 'by_name', 'value' => $aCover['setting']), $aSetting, false);
  296. if(empty($aSetting) || !is_array($aSetting))
  297. continue;
  298. $aFormInputs[$sCover] = array(
  299. 'type' => 'files',
  300. 'name' => $sCover,
  301. 'storage_object' => $this->sCoverStorage,
  302. 'images_transcoder' => $this->sCoverTranscoder,
  303. 'uploaders' => array('sys_std_crop_cover'),
  304. 'multiple' => false,
  305. 'content_id' => $aSetting['id'],
  306. 'ghost_template' => BxDolStudioTemplate::getInstance()->parseHtmlByName('uploader_fgt_cover.html', array(
  307. 'name' => $sCover,
  308. )),
  309. 'caption' => _t('_adm_dsg_txt_upload_' . $sCover),
  310. 'db' => array (
  311. 'pass' => 'Int',
  312. )
  313. );
  314. if(($iImageId = (int)getParam($aCover['setting'])) == 0)
  315. continue;
  316. $sImageUrl = BxDolTranscoderImage::getObjectInstance($aCover['transcoder'])->getFileUrl($iImageId);
  317. if($sImageUrl === false) {
  318. setParam($aCover['setting'], 0);
  319. continue;
  320. }
  321. $aTmplVarsCovers[] = array(
  322. 'image_id' => $iImageId,
  323. 'content' => $oTemplate->parseHtmlByName($aCover['template'], array(
  324. 'js_object' => $sJsObject,
  325. 'type' => $sCover,
  326. 'caption' => _t($aCover['title']),
  327. 'image_id' => $iImageId,
  328. 'bx_if:show_bg' => array(
  329. 'condition' => !empty($sImageUrl),
  330. 'content' => array(
  331. 'image_url' => $sImageUrl
  332. )
  333. ),
  334. ))
  335. );
  336. }
  337. $aForm = array(
  338. 'form_attrs' => array(
  339. 'id' => $this->sCoverFormId,
  340. 'name' => $this->sCoverFormId,
  341. 'action' => BX_DOL_URL_STUDIO . 'designer.php',
  342. 'method' => 'post',
  343. 'enctype' => 'multipart/form-data',
  344. 'target' => $this->sCoverIframeId
  345. ),
  346. 'params' => array(
  347. 'db' => array(
  348. 'table' => '',
  349. 'key' => '',
  350. 'uri' => '',
  351. 'uri_title' => '',
  352. 'submit_name' => 'save'
  353. ),
  354. ),
  355. 'inputs' => array(
  356. 'page' => array(
  357. 'type' => 'hidden',
  358. 'name' => 'page',
  359. 'value' => $this->sPage
  360. ),
  361. 'disabled' => array(
  362. 'type' => 'checkbox',
  363. 'name' => 'enabled',
  364. 'caption' => _t('_adm_dsg_txt_cover_disabled'),
  365. 'value' => 'on',
  366. 'checked' => getParam('sys_site_cover_disabled') == 'on',
  367. 'db' => array (
  368. 'pass' => 'Xss',
  369. ),
  370. ),
  371. 'preview' => array(
  372. 'type' => 'custom',
  373. 'name' => 'preview',
  374. 'content' => $oTemplate->parseHtmlByName('dsr_cover_preview.html', array(
  375. 'bx_repeat:covers' => $aTmplVarsCovers
  376. ))
  377. ),
  378. 'save' => array(
  379. 'type' => 'submit',
  380. 'name' => 'save',
  381. 'value' => _t('_adm_btn_designer_submit'),
  382. )
  383. )
  384. );
  385. $aForm['inputs'] = bx_array_insert_after($aFormInputs, $aForm['inputs'], 'preview');
  386. $oForm = new BxTemplStudioFormView($aForm);
  387. $oForm->initChecker();
  388. if($oForm->isSubmittedAndValid()) {
  389. echo $this->submitCover($oForm);
  390. exit;
  391. }
  392. $this->aPageCss[] = 'cover.css';
  393. return $oTemplate->parseHtmlByName('designer.html', array(
  394. 'content' => $oTemplate->parseHtmlByName('dsr_cover.html', array('iframe_id' => $this->sCoverIframeId, 'form' => $oForm->getCode())),
  395. 'js_content' => $this->getPageJsCode()
  396. ));
  397. }
  398. protected function getSplash()
  399. {
  400. $oTemplate = BxDolStudioTemplate::getInstance();
  401. $aForm = array(
  402. 'form_attrs' => array(
  403. 'id' => $this->sSplashFormId,
  404. 'name' => $this->sSplashFormId,
  405. 'action' => BX_DOL_URL_STUDIO . 'designer.php',
  406. 'method' => 'post',
  407. 'enctype' => 'multipart/form-data',
  408. 'target' => $this->sSplashIframeId
  409. ),
  410. 'params' => array(
  411. 'db' => array(
  412. 'table' => '',
  413. 'key' => '',
  414. 'uri' => '',
  415. 'uri_title' => '',
  416. 'submit_name' => 'save'
  417. ),
  418. ),
  419. 'inputs' => array(
  420. 'page' => array(
  421. 'type' => 'hidden',
  422. 'name' => 'page',
  423. 'value' => $this->sPage
  424. ),
  425. 'enabled' => array(
  426. 'type' => 'checkbox',
  427. 'name' => 'enabled',
  428. 'caption' => _t('_adm_dsg_txt_splash_enabled'),
  429. 'value' => 'on',
  430. 'checked' => getParam('sys_site_splash_enabled') == 'on',
  431. 'db' => array (
  432. 'pass' => 'Xss',
  433. ),
  434. ),
  435. 'code' => array(
  436. 'type' => 'textarea',
  437. 'code' => true,
  438. 'name' => 'code',
  439. 'caption' => '',
  440. 'value' => getParam('sys_site_splash_code'),
  441. ),
  442. 'save' => array(
  443. 'type' => 'submit',
  444. 'name' => 'save',
  445. 'value' => _t('_adm_btn_designer_submit'),
  446. )
  447. )
  448. );
  449. $oForm = new BxTemplStudioFormView($aForm, $oTemplate);
  450. $oForm->initChecker();
  451. if($oForm->isSubmittedAndValid()) {
  452. echo $this->submitSplash($oForm);
  453. exit;
  454. }
  455. $oTemplate->addJs(array('codemirror/codemirror.min.js'));
  456. $oTemplate->addCss(BX_DIRECTORY_PATH_PLUGINS_PUBLIC . 'codemirror/|codemirror.css');
  457. return $oTemplate->parseHtmlByName('designer.html', array(
  458. 'content' => $oTemplate->parseHtmlByName('dsr_splash.html', array(
  459. 'warning' => MsgBox(_t('_adm_dsg_dsc_splash_warning')),
  460. 'splash_iframe_id' => $this->sSplashIframeId,
  461. 'form' => $oForm->getCode()
  462. )),
  463. 'js_content' => $this->getPageJsCode(array(
  464. 'sCodeMirror' => 'textarea[name=code]'
  465. )),
  466. ));
  467. }
  468. protected function getInjections()
  469. {
  470. $oTemplate = BxDolStudioTemplate::getInstance();
  471. $aForm = array(
  472. 'form_attrs' => array(
  473. 'id' => $this->sInjectionsFormId,
  474. 'name' => $this->sInjectionsFormId,
  475. 'action' => BX_DOL_URL_STUDIO . 'designer.php',
  476. 'method' => 'post',
  477. 'enctype' => 'multipart/form-data',
  478. 'target' => $this->sInjectionsIframeId
  479. ),
  480. 'params' => array(
  481. 'db' => array(
  482. 'table' => '',
  483. 'key' => '',
  484. 'uri' => '',
  485. 'uri_title' => '',
  486. 'submit_name' => 'save'
  487. ),
  488. ),
  489. 'inputs' => array(
  490. 'page' => array(
  491. 'type' => 'hidden',
  492. 'name' => 'page',
  493. 'value' => $this->sPage
  494. ),
  495. 'sys_head' => array(
  496. 'type' => 'textarea',
  497. 'code' => true,
  498. 'name' => 'sys_head',
  499. 'caption' => _t('_adm_dsg_txt_inj_head'),
  500. 'info' => _t('_adm_dsg_txt_inj_head_inf'),
  501. 'value' => $this->oDb->getOne("SELECT `data` FROM `sys_injections` WHERE `name`='sys_head'"),
  502. ),
  503. 'sys_body' => array(
  504. 'type' => 'textarea',
  505. 'code' => true,
  506. 'name' => 'sys_body',
  507. 'caption' => _t('_adm_dsg_txt_inj_body'),
  508. 'info' => _t('_adm_dsg_txt_inj_body_inf'),
  509. 'value' => $this->oDb->getOne("SELECT `data` FROM `sys_injections` WHERE `name`='sys_body'"),
  510. ),
  511. 'save' => array(
  512. 'type' => 'submit',
  513. 'name' => 'save',
  514. 'value' => _t('_adm_btn_designer_submit'),
  515. )
  516. )
  517. );
  518. $oForm = new BxTemplStudioFormView($aForm, $oTemplate);
  519. $oForm->initChecker();
  520. if($oForm->isSubmittedAndValid()) {
  521. echo $this->submitInjections($oForm);
  522. exit;
  523. }
  524. $oTemplate->addJs(array('codemirror/codemirror.min.js'));
  525. $oTemplate->addCss(BX_DIRECTORY_PATH_PLUGINS_PUBLIC . 'codemirror/|codemirror.css');
  526. return $oTemplate->parseHtmlByName('designer.html', array(
  527. 'content' => $oTemplate->parseHtmlByName('dsr_injections.html', array(
  528. 'warning' => '',
  529. 'splash_iframe_id' => $this->sInjectionsIframeId,
  530. 'form' => $oForm->getCode()
  531. )),
  532. 'js_content' => $this->getPageJsCode(array(
  533. 'sCodeMirror' => 'textarea[name=sys_head],textarea[name=sys_body]'
  534. ))
  535. ));
  536. }
  537. protected function getSettings()
  538. {
  539. $oOptions = new BxTemplStudioOptions(BX_DOL_STUDIO_STG_TYPE_SYSTEM, BX_DOL_STUDIO_STG_CATEGORY_TEMPLATES);
  540. $this->aPageCss = array_merge($this->aPageCss, $oOptions->getCss());
  541. $this->aPageJs = array_merge($this->aPageJs, $oOptions->getJs());
  542. return BxDolStudioTemplate::getInstance()->parseHtmlByName('designer.html', array(
  543. 'content' => $oOptions->getCode(),
  544. 'js_content' => $this->getPageJsCode()
  545. ));
  546. }
  547. }
  548. /** @} */