BxSpacesGridCommon.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  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. * @defdroup Spaces Spaces
  7. * @indroup UnaModules
  8. *
  9. * @{
  10. */
  11. class BxSpacesGridCommon extends BxBaseModGroupsGridCommon
  12. {
  13. public function __construct ($aOptions, $oTemplate = false)
  14. {
  15. $this->MODULE = 'bx_spaces';
  16. parent::__construct ($aOptions, $oTemplate);
  17. }
  18. protected function _getActionSettings($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array())
  19. {
  20. if ($this->_oModule->_oDb->getCountEntriesByParent($aRow["id"]))
  21. return '';
  22. return parent::_getActionSettings($sType, $sKey, $a, $isSmall, $isDisabled, $aRow);
  23. }
  24. protected function _isCheckboxDisabled($aRow)
  25. {
  26. if ($this->_oModule->_oDb->getCountEntriesByParent($aRow["id"]))
  27. return true;
  28. return parent::_isCheckboxDisabled($aRow);
  29. }
  30. }
  31. /** @} */