BxDolContentInfoCmts.php 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. class BxDolContentInfoCmts extends BxDolContentInfo
  10. {
  11. protected $_oCmts;
  12. protected function __construct($sSystem)
  13. {
  14. parent::__construct($sSystem);
  15. $this->_oCmts = BxDolCmts::getObjectInstance($this->_aSystem['alert_unit'], 0, false);
  16. }
  17. public function getContentAuthor ($iContentId)
  18. {
  19. return $this->_oCmts->serviceGetAuthor($iContentId);
  20. }
  21. public function getContentDateAdded ($iContentId)
  22. {
  23. return $this->_oCmts->serviceGetDateAdded($iContentId);
  24. }
  25. public function getContentDateChanged ($iContentId)
  26. {
  27. return $this->_oCmts->serviceGetDateChanged($iContentId);
  28. }
  29. public function getContentTitle ($iContentId)
  30. {
  31. return $this->_oCmts->serviceGetTitle($iContentId);
  32. }
  33. public function getContentThumb ($iContentId)
  34. {
  35. return $this->_oCmts->serviceGetThumb($iContentId);
  36. }
  37. public function getContentLink ($iContentId)
  38. {
  39. return $this->_oCmts->serviceGetLink($iContentId);
  40. }
  41. public function getContentText ($iContentId)
  42. {
  43. return $this->_oCmts->serviceGetText($iContentId);
  44. }
  45. public function getContentInfo ($iContentId, $bSearchableFieldsOnly = true)
  46. {
  47. return $this->_oCmts->serviceGetInfo($iContentId);
  48. }
  49. public function getContentSearchResultUnit ($iContentId, $sUnitTemplate = '')
  50. {
  51. $this->_oCmts->addCssJs();
  52. return '<ul class="cmts">' . $this->_oCmts->serviceGetSearchResultUnit($iContentId, $sUnitTemplate) . '</ul>';
  53. }
  54. public function getAll ($aParams = array())
  55. {
  56. return $this->_oCmts->serviceGetAll($aParams);
  57. }
  58. public function getSearchableFieldsExtended ()
  59. {
  60. return $this->_oCmts->serviceGetSearchableFieldsExtended();
  61. }
  62. public function getSearchResultExtended ($aParams, $iStart = 0, $iPerPage = 0)
  63. {
  64. return $this->_oCmts->serviceGetSearchResultExtended($aParams, $iStart, $iPerPage);
  65. }
  66. }
  67. /** @} */