BxCreditsMenuManage.php 971 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. class BxCreditsMenuManage extends BxTemplMenu
  12. {
  13. protected $_sModule;
  14. protected $_oModule;
  15. public function __construct($aObject, $oTemplate = false)
  16. {
  17. parent::__construct($aObject, $oTemplate);
  18. $this->_sModule = 'bx_credits';
  19. $this->_oModule = BxDolModule::getInstance($this->_sModule);
  20. }
  21. protected function _isVisible ($a)
  22. {
  23. if(!parent::_isVisible($a))
  24. return false;
  25. $bResult = true;
  26. switch ($a['name']) {
  27. case 'credits-withdrawals-common':
  28. case 'credits-withdrawals-administration':
  29. $bResult = $this->_oModule->_oConfig->isWithdraw();
  30. break;
  31. }
  32. return $bResult;
  33. }
  34. }
  35. /** @} */