BxPollsFormsEntryHelper.php 794 B

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. * @defgroup Polls Polls
  7. * @ingroup UnaModules
  8. *
  9. * @{
  10. */
  11. /**
  12. * Entry forms helper functions
  13. */
  14. class BxPollsFormsEntryHelper extends BxBaseModTextFormsEntryHelper
  15. {
  16. public function __construct($oModule)
  17. {
  18. parent::__construct($oModule);
  19. }
  20. public function onDataDeleteAfter($iContentId, $aContentInfo, $oProfile)
  21. {
  22. $sResult = parent::onDataDeleteAfter ($iContentId, $aContentInfo, $oProfile);
  23. if(!empty($sResult))
  24. return $sResult;
  25. $this->_oModule->_oDb->deleteSubentry(array(
  26. 'entry_id' => $iContentId
  27. ));
  28. return '';
  29. }
  30. }
  31. /** @} */