BxDolStudioAgentsAutomators.php 1008 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 UnaStudio UNA Studio
  7. * @{
  8. */
  9. class BxDolStudioAgentsAutomators extends BxTemplStudioGrid
  10. {
  11. protected $_oDb;
  12. protected $_sCmts;
  13. protected $_iProfileIdAi;
  14. public function __construct ($aOptions, $oTemplate = false)
  15. {
  16. parent::__construct ($aOptions, $oTemplate);
  17. $this->_sDefaultSortingOrder = 'DESC';
  18. $this->_oDb = new BxDolStudioAgentsQuery();
  19. $this->_sCmts = 'sys_agents_automators';
  20. $this->_iProfileIdAi = BxDolAI::getInstance()->getProfileId();
  21. }
  22. protected function _delete ($mixedId)
  23. {
  24. $mixedResult = parent::_delete($mixedId);
  25. if($mixedResult !== false && ($oCmts = BxDolCmts::getObjectInstance($this->_sCmts, $mixedId)) !== null) {
  26. $oCmts->onObjectDelete($mixedId);
  27. }
  28. return $mixedResult;
  29. }
  30. }
  31. /** @} */