BxBaseModGroupsInstaller.php 980 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 BaseGroups Base classes for groups modules
  7. * @ingroup UnaModules
  8. *
  9. * @{
  10. */
  11. class BxBaseModGroupsInstaller extends BxBaseModProfileInstaller
  12. {
  13. protected $_bPaidJoin;
  14. public function __construct($aConfig)
  15. {
  16. parent::__construct($aConfig);
  17. $this->_bPaidJoin = true;
  18. }
  19. public function enable($aParams)
  20. {
  21. $aResult = parent::enable($aParams);
  22. if($this->_bPaidJoin && $aResult['result'])
  23. BxDolPayments::getInstance()->updateDependentModules($this->_aConfig['name'], true);
  24. return $aResult;
  25. }
  26. public function disable($aParams)
  27. {
  28. if($this->_bPaidJoin)
  29. BxDolPayments::getInstance()->updateDependentModules($this->_aConfig['name'], false);
  30. return parent::disable($aParams);
  31. }
  32. }
  33. /** @} */