BxCreditsStudioPage.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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 Credits Credits
  7. * @ingroup UnaModules
  8. *
  9. * @{
  10. */
  11. define('BX_DOL_STUDIO_MOD_TYPE_BUNDLES', 'bundles');
  12. class BxCreditsStudioPage extends BxTemplStudioModule
  13. {
  14. protected $_sModule;
  15. protected $_oModule;
  16. function __construct($sModule, $mixedPageName, $sPage = "")
  17. {
  18. $this->_sModule = 'bx_credits';
  19. $this->_oModule = BxDolModule::getInstance($this->_sModule);
  20. parent::__construct($sModule, $mixedPageName, $sPage);
  21. $this->aMenuItems[BX_DOL_STUDIO_MOD_TYPE_BUNDLES] = array('name' => BX_DOL_STUDIO_MOD_TYPE_BUNDLES, 'icon' => 'archive', 'title' => '_bx_credits_menu_item_title_bundles');
  22. }
  23. protected function getSettings()
  24. {
  25. $sContent = '';
  26. if($this->_oModule->_oConfig->getAuthor() == 0)
  27. $sContent .= $this->_oModule->_oTemplate->getEmptyAuthor();
  28. $sContent .= parent::getSettings();
  29. return $sContent;
  30. }
  31. protected function getBundles()
  32. {
  33. $CNF = &$this->_oModule->_oConfig->CNF;
  34. $oGrid = BxDolGrid::getObjectInstance($CNF['OBJECT_GRID_BUNDLES'], BxDolStudioTemplate::getInstance());
  35. if(!$oGrid)
  36. return '';
  37. $sContent = '';
  38. if($this->_oModule->_oConfig->getAuthor() == 0)
  39. $sContent .= $this->_oModule->_oTemplate->getEmptyAuthor();
  40. $sContent .= $this->_oModule->_oTemplate->getJsCode('studio');
  41. $sContent .= $oGrid->getCode();
  42. $this->_oModule->_oTemplate->addJs('studio');
  43. return $sContent;
  44. }
  45. }
  46. /** @} */