1
0

BxBaseModGroupsGridAdministration.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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 BxBaseModGroupsGridAdministration extends BxBaseModProfileGridAdministration
  12. {
  13. public function __construct ($aOptions, $oTemplate = false)
  14. {
  15. parent::__construct ($aOptions, $oTemplate);
  16. }
  17. protected function _getActionAuditContext($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array())
  18. {
  19. if (!getParam('sys_audit_enable') || getParam('sys_audit_acl_levels') == '')
  20. return;
  21. $iProfileId = bx_get_logged_profile_id();
  22. if (!BxDolAcl::getInstance()->isMemberLevelInSet(explode(',', getParam('sys_audit_acl_levels')), $iProfileId))
  23. return;
  24. $CNF = &$this->_oModule->_oConfig->CNF;
  25. $oProfile = $this->_getProfileObject($aRow[$CNF['FIELD_ID']]);
  26. $sUrl = BX_DOL_URL_ROOT . 'page/audit-administration?context_id=' . $oProfile->id();
  27. $a['attr'] = array_merge($a['attr'], array(
  28. "onclick" => "window.open('" . $sUrl . "','_audit');"
  29. ));
  30. return $this->_getActionDefault ($sType, $sKey, $a, $isSmall, $isDisabled, $aRow);
  31. }
  32. protected function _getCellName($mixedValue, $sKey, $aField, $aRow)
  33. {
  34. $oProfile = $this->_getProfileObject($aRow['id']);
  35. return parent::_getCellDefault($oProfile->getUnit(0, array('template' => 'unit_wo_cover')), $sKey, $aField, $aRow);
  36. }
  37. }
  38. /** @} */