BxAclResponse.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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 PaidLevels Paid Levels
  7. * @ingroup UnaModules
  8. *
  9. * @{
  10. */
  11. class BxAclResponse extends BxDolAlertsResponse
  12. {
  13. protected $MODULE;
  14. protected $_oModule;
  15. public function __construct()
  16. {
  17. $this->MODULE = 'bx_acl';
  18. $this->_oModule = BxDolModule::getInstance($this->MODULE);
  19. parent::__construct();
  20. }
  21. /**
  22. * Overwtire the method of parent class.
  23. *
  24. * @param BxDolAlerts $oAlert an instance of alert.
  25. */
  26. public function response($oAlert)
  27. {
  28. $sMethod = '_process' . bx_gen_method_name($oAlert->sUnit . '_' . $oAlert->sAction);
  29. if(!method_exists($this, $sMethod))
  30. return;
  31. $this->$sMethod($oAlert);
  32. }
  33. protected function _processSystemPageOutputBlockAclLevel($oAlert)
  34. {
  35. $oAlert->aExtras['block_code'] .= $this->_oModule->serviceGetMembershipActions((int)$oAlert->aExtras['block_owner']);
  36. }
  37. protected function _processAclDeleted($oAlert)
  38. {
  39. $this->_oModule->_oDb->deletePrices(array('level_id' => $oAlert->iObject));
  40. }
  41. }
  42. /** @} */