BxReviewsStudioPage.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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 Reviews Reviews
  7. * @ingroup UnaModules
  8. *
  9. * @{
  10. */
  11. class BxReviewsStudioPage extends BxTemplStudioModule
  12. {
  13. protected $_sModule;
  14. protected $_oModule;
  15. function __construct($sModule, $mixedPageName, $sPage = "")
  16. {
  17. $this->_sModule = 'bx_reviews';
  18. $this->_oModule = BxDolModule::getInstance($this->_sModule);
  19. parent::__construct($sModule, $mixedPageName, $sPage);
  20. $this->aMenuItems = [
  21. 'settings' => ['name' => 'settings', 'icon' => 'cog', 'title' => '_bx_reviews_txt_settings'],
  22. 'voting_options' => ['name' => 'voting_options', 'icon' => 'star', 'title' => '_bx_reviews_txt_voting_options'],
  23. ];
  24. }
  25. protected function getVotingOptions()
  26. {
  27. bx_import('BxTemplGrid');
  28. /** @noinspection PhpParamsInspection */
  29. $oGrid = BxDolGrid::getObjectInstance('bx_reviews_voting_options', BxDolStudioTemplate::getInstance());
  30. if (!$oGrid) die('"bx_reviews_voting_options" grid object is not defined');
  31. return $oGrid->getCode();
  32. }
  33. }
  34. /** @} */