BxArtificerStudioPage.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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 Artificer Artificer template
  7. * @ingroup UnaModules
  8. *
  9. * @{
  10. */
  11. require_once('BxArtificerStudioOptions.php');
  12. define('BX_ARTIFICER_STUDIO_TEMPL_TYPE_STYLES', 'styles');
  13. class BxArtificerStudioPage extends BxTemplStudioDesign
  14. {
  15. function __construct($sModule, $mixedPageName, $sPage = "")
  16. {
  17. parent::__construct($sModule, $mixedPageName, $sPage);
  18. $this->aMenuItems = bx_array_insert_after([
  19. BX_ARTIFICER_STUDIO_TEMPL_TYPE_STYLES => ['title' => '_bx_artificer_lmi_cpt_styles', 'icon' => 'mi-tpl-styles.svg', 'icon_bg' => true]
  20. ], $this->aMenuItems, BX_DOL_STUDIO_TEMPL_TYPE_SETTINGS);
  21. }
  22. protected function getSettings($mixedCategory = '', $sMix = '')
  23. {
  24. return parent::getSettings('bx_artificer_system', $sMix);
  25. }
  26. protected function getStyles($mixedCategory = '', $sMix = '')
  27. {
  28. $sPrefix = $this->sModule;
  29. if(empty($mixedCategory))
  30. $mixedCategory = [
  31. $sPrefix . '_styles_custom',
  32. ];
  33. $oOptions = new BxArtificerStudioOptions($this->sModule, $mixedCategory, $sMix);
  34. return BxDolStudioTemplate::getInstance()->parseHtmlByName('design.html', [
  35. 'content' => $oOptions->getCode(),
  36. 'js_content' => $this->getPageJsCode()
  37. ]);
  38. }
  39. }
  40. /** @} */