| 123456789101112131415161718192021222324252627282930313233343536 |
- <?php defined('BX_DOL') or die('hack attempt');
- /**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- *
- * @defgroup Organizations Organizations
- * @ingroup UnaModules
- *
- * @{
- */
- class BxOrgsFavorite extends BxTemplFavorite
- {
- protected $MODULE;
- protected $_oModule;
- function __construct($aOptions, $oTemplate = false)
- {
- $this->MODULE = 'bx_organizations';
- parent::__construct($aOptions, $oTemplate);
- $this->_oModule = BxDolModule::getInstance($this->MODULE);
- }
- public function isAllowedFavorite($isPerformAction = false)
- {
- $oProfile = BxDolProfile::getInstanceByContentAndType($this->getId(), $this->_oModule->getName());
- if($oProfile && $oProfile->id() == bx_get_logged_profile_id())
- return false;
- return parent::isAllowedFavorite($isPerformAction);
- }
- }
- /** @} */
|