BxBaseStudioLanguage.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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 BxBaseStudioLanguage extends BxDolStudioLanguage
  11. {
  12. protected $aMenuItems = array(
  13. BX_DOL_STUDIO_LANG_TYPE_SETTINGS => array('name' => BX_DOL_STUDIO_LANG_TYPE_SETTINGS, 'caption' => '_adm_lmi_cpt_settings', 'icon' => 'cogs')
  14. );
  15. public function __construct($sModule, $mixedPageName, $sPage = "")
  16. {
  17. parent::__construct($sModule, $mixedPageName, $sPage);
  18. $this->oHelper = BxTemplStudioLanguages::getInstance();
  19. }
  20. public function getPageCaption()
  21. {
  22. $oTemplate = BxDolStudioTemplate::getInstance();
  23. $aTmplVars = array(
  24. 'js_object' => $this->getPageJsObject(),
  25. 'content' => parent::getPageCaption(),
  26. );
  27. return $oTemplate->parseHtmlByName('lang_page_caption.html', $aTmplVars);
  28. }
  29. protected function getSettings()
  30. {
  31. $oOptions = new BxTemplStudioOptions($this->sModule);
  32. $this->aPageCss = array_merge($this->aPageCss, $oOptions->getCss());
  33. $this->aPageJs = array_merge($this->aPageJs, $oOptions->getJs());
  34. return BxDolStudioTemplate::getInstance()->parseHtmlByName('language.html', array(
  35. 'content' => $oOptions->getCode()
  36. ));
  37. }
  38. }
  39. /** @} */