BxBaseStudioLanguage.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. $oPage = new BxTemplStudioSettings($this->sModule);
  32. return BxDolStudioTemplate::getInstance()->parseHtmlByName('language.html', array(
  33. 'content' => $oPage->getFormCode()
  34. ));
  35. }
  36. }
  37. /** @} */