BxDolGridSubscriptions.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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 UnaCore UNA Core
  7. * @{
  8. */
  9. require_once(BX_DIRECTORY_PATH_INC . "design.inc.php");
  10. class BxDolGridSubscriptions extends BxDolGridSubscribedMe
  11. {
  12. protected $_sConnectionMethod = 'getConnectedContentAsSQLParts';
  13. public function __construct ($aOptions, $oTemplate = false)
  14. {
  15. parent::__construct ($aOptions, $oTemplate);
  16. }
  17. protected function _delete ($mixedId)
  18. {
  19. list($iId, $iViewedId) = $this->_prepareIds();
  20. if(!$this->_oConnection->isConnected($iViewedId, $iId))
  21. return true;
  22. return $this->_oConnection->removeConnection($iViewedId, $iId);
  23. }
  24. protected function _getActionDelete ($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array())
  25. {
  26. if (!isLogged() || !$this->_bOwner)
  27. return '';
  28. return parent::_getActionDefault ($sType, $sKey, $a, $isSmall, $isDisabled, $aRow);
  29. }
  30. }
  31. /** @} */