1
0

BxBaseRecommendationProfile.php 933 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 UnaBaseView UNA Base Representation Classes
  7. * @{
  8. */
  9. /**
  10. * Profile recommendation representation.
  11. * @see BxDolRecommendation
  12. */
  13. class BxBaseRecommendationProfile extends BxDolRecommendationProfile
  14. {
  15. public function __construct ($aOptions, $oTemplate)
  16. {
  17. parent::__construct ($aOptions, $oTemplate);
  18. $this->_sClassWrapper = 'bx-base-pofile-units-wrapper bx-base-puw-gallery';
  19. }
  20. public function getCodeItem($iId, $iCount)
  21. {
  22. $oProfile = BxDolProfile::getInstance($iId);
  23. if(!$oProfile)
  24. return '';
  25. return $oProfile->{'getUnit' . ($this->_bIsApi ? 'API' : '')}(0, [
  26. 'template' => 'unit_with_cover',
  27. 'context' => $this->_getContextName()
  28. ]);
  29. }
  30. }
  31. /** @} */