1
0

BxGroupsPageEntriesInContext.php 999 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  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 Groups Groups
  7. * @ingroup UnaModules
  8. *
  9. * @{
  10. */
  11. /**
  12. * Entries user joined to.
  13. */
  14. class BxGroupsPageEntriesInContext extends BxBaseModGroupsPageJoinedEntries
  15. {
  16. protected $_sModule;
  17. protected $_oModule;
  18. public function __construct($aObject, $oTemplate = false)
  19. {
  20. $this->_sModule = 'bx_groups';
  21. $this->_oModule = BxDolModule::getInstance($this->_sModule);
  22. parent::__construct($aObject, $oTemplate);
  23. }
  24. public function getCode ()
  25. {
  26. $iProfileId = bx_process_input(bx_get('profile_id'), BX_DATA_INT);
  27. if ($iProfileId) {
  28. if (!$this->_oModule->serviceIsEnableForContext($iProfileId)){
  29. $this->_oTemplate->displayPageNotFound();
  30. return;
  31. }
  32. }
  33. return parent::getCode();
  34. }
  35. }
  36. /** @} */