BxBaseCmtsServices.php 731 B

123456789101112131415161718192021222324252627282930313233
  1. <?php defined('BX_DOL') or die('hack attempt');
  2. /**
  3. * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
  4. * CC-BY License - http://creativecommons.org/licenses/by/3.0/
  5. *
  6. * @defgroup DolphinCore Dolphin Core
  7. * @{
  8. */
  9. /**
  10. * System services related to Comments.
  11. */
  12. class BxBaseCmtsServices extends BxDol
  13. {
  14. public function __construct()
  15. {
  16. parent::__construct();
  17. }
  18. public function serviceGetMenuItemAddonVote($sSystem, $iId, $iCmtId)
  19. {
  20. bx_import('BxDolCmts');
  21. $oCmts = BxDolCmts::getObjectInstance($sSystem, $iId);
  22. $oVote = $oCmts->getVoteObject($iCmtId);
  23. if($oVote !== false)
  24. return $oVote->getCounter();
  25. return '';
  26. }
  27. }
  28. /** @} */