BxBaseStudioDesigner.php 22 KB

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