BxBaseMenuAccountPopup.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php defined('BX_DOL') or die('hack attempt');
  2. /**
  3. * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
  4. * CC-BY License - http://creativecommons.org/licenses/by/3.0/
  5. *
  6. * @defgroup TridentCore Trident Core
  7. * @{
  8. */
  9. bx_import('BxTemplMenu');
  10. bx_import('BxDolPermalinks');
  11. /**
  12. * Menu representation.
  13. * @see BxDolMenu
  14. */
  15. class BxBaseMenuAccountPopup extends BxTemplMenu
  16. {
  17. public function __construct ($aObject, $oTemplate)
  18. {
  19. parent::__construct ($aObject, $oTemplate);
  20. }
  21. protected function _getTemplateVars ()
  22. {
  23. $aVars = parent::_getTemplateVars ();
  24. $aVars['bx_repeat:menu_items'] = array(true);
  25. $aVars['profile_display_name'] = BxDolProfile::getInstance()->getDisplayName();
  26. $aVars['url_switch_profile'] = BxDolPermalinks::getInstance()->permalink('page.php?i=account-profile-switcher');
  27. $aVars['menu_account'] = BxDolMenu::getObjectInstance('sys_account')->getCode();
  28. $aVars['menu_notifications'] = BxDolMenu::getObjectInstance('sys_account_notifications')->getCode();
  29. $a = BxDolService::call('system', 'account_profile_switcher', array(), 'TemplServiceProfiles');
  30. $aVars['profile_switcher'] = $a['content'];
  31. return $aVars;
  32. }
  33. }
  34. /** @} */