BxBaseStudioDesign.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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 BxBaseStudioDesign extends BxDolStudioDesign
  11. {
  12. protected $aMenuItems = array(
  13. BX_DOL_STUDIO_TEMPL_TYPE_SETTINGS => array('title' => '_adm_lmi_cpt_settings', 'icon' => 'cogs'),
  14. BX_DOL_STUDIO_TEMPL_TYPE_LOGO => array('title' => '_adm_lmi_cpt_logo', 'icon' => 'pencil-alt')
  15. );
  16. public function __construct($sModule, $mixedPageName, $sPage = "")
  17. {
  18. parent::__construct($sModule, $mixedPageName, $sPage);
  19. $this->oHelper = BxTemplStudioDesigns::getInstance();
  20. }
  21. public function getPageJs()
  22. {
  23. return array_merge(parent::getPageJs(), array('jquery.form.min.js', 'jquery.webForms.js'));
  24. }
  25. protected function getSettings($mixedCategory = '', $sMix = '')
  26. {
  27. $oPage = new BxTemplStudioSettings($this->sModule, $mixedCategory, $sMix);
  28. return BxDolStudioTemplate::getInstance()->parseHtmlByName('design.html', array(
  29. 'content' => $oPage->getFormCode(),
  30. 'js_content' => $this->getPageJsCode(),
  31. ));
  32. }
  33. protected function getLogo()
  34. {
  35. $oPage = $this->getObjectDesigner();
  36. $oTemplate = BxDolStudioTemplate::getInstance();
  37. $oTemplate->addJs($oPage->getPageJs());
  38. $oTemplate->addCss($oPage->getPageCss());
  39. return $oTemplate->parseHtmlByName('design.html', array(
  40. 'content' => $oPage->getPageCode(),
  41. 'js_content' => $this->getPageJsCode()
  42. ));
  43. }
  44. }
  45. /** @} */