BxJobsGridConnections.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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 Jobs Jobs
  7. * @ingroup UnaModules
  8. *
  9. * @{
  10. */
  11. class BxJobsGridConnections extends BxBaseModGroupsGridConnections
  12. {
  13. public function __construct ($aOptions, $oTemplate = false)
  14. {
  15. $this->_sContentModule = 'bx_jobs';
  16. parent::__construct ($aOptions, $oTemplate);
  17. }
  18. protected function _getActionSetRole ($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = [])
  19. {
  20. $CNF = &$this->_oModule->_oConfig->CNF;
  21. if($this->_aContentInfo[$CNF['FIELD_AUTHOR']] == $aRow['id'])
  22. return $this->_bIsApi ? [] : '';
  23. return parent::_getActionSetRole ($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = []);
  24. }
  25. protected function _getActionDelete ($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = [])
  26. {
  27. $CNF = &$this->_oModule->_oConfig->CNF;
  28. if($this->_aContentInfo[$CNF['FIELD_AUTHOR']] == $aRow['id'])
  29. return $this->_bIsApi ? [] : '';
  30. return parent::_getActionDelete ($sType, $sKey, $a, $isSmall, $isDisabled, $aRow);
  31. }
  32. }
  33. /** @} */