BxAdsMenuViewActions.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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 Ads Ads
  7. * @ingroup UnaModules
  8. *
  9. * @{
  10. */
  11. /**
  12. * View entry social actions menu
  13. */
  14. class BxAdsMenuViewActions extends BxBaseModTextMenuViewActions
  15. {
  16. public function __construct($aObject, $oTemplate = false)
  17. {
  18. $this->_sModule = 'bx_ads';
  19. parent::__construct($aObject, $oTemplate);
  20. }
  21. public function getCode ()
  22. {
  23. $sCode = parent::getCode();
  24. if(!empty($this->_oMenuActions))
  25. $sCode .= $this->_oMenuActions->getJsCode();
  26. return $sCode;
  27. }
  28. protected function _getMenuItemInterested($aItem)
  29. {
  30. return $this->_getMenuItemByNameActions($aItem);
  31. }
  32. protected function _getMenuItemAddToCart($aItem)
  33. {
  34. return $this->_getMenuItemByNameActions($aItem);
  35. }
  36. protected function _getMenuItemMakeOffer($aItem)
  37. {
  38. return $this->_getMenuItemByNameActions($aItem);
  39. }
  40. protected function _getMenuItemViewOffers($aItem)
  41. {
  42. return $this->_getMenuItemByNameActions($aItem);
  43. }
  44. protected function _getMenuItemEditAd($aItem)
  45. {
  46. return $this->_getMenuItemByNameActions($aItem);
  47. }
  48. protected function _getMenuItemDeleteAd($aItem)
  49. {
  50. return $this->_getMenuItemByNameActions($aItem);
  51. }
  52. protected function _getMenuItemReview($aItem, $aParams = array())
  53. {
  54. $CNF = &$this->_oModule->_oConfig->CNF;
  55. return parent::_getMenuItemComment($aItem, array_merge($aParams, array(
  56. 'object' => $CNF['OBJECT_REVIEWS']
  57. )));
  58. }
  59. }
  60. /** @} */