BxBaseStudioDesigner.php 21 KB

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