BxBaseMenuAccount.php 873 B

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. /**
  11. * Menu representation.
  12. * @see BxDolMenu
  13. */
  14. class BxBaseMenuAccount extends BxTemplMenu
  15. {
  16. public function __construct ($aObject, $oTemplate)
  17. {
  18. parent::__construct ($aObject, $oTemplate);
  19. $this->addMarkers(array(
  20. 'studio_url' => BX_DOL_URL_STUDIO
  21. ));
  22. }
  23. /**
  24. * Check if menu items are visible with extended checking
  25. * @param $a menu item array
  26. * @return boolean
  27. */
  28. protected function _isVisible ($a)
  29. {
  30. if($a['name'] == 'studio' && !isAdmin())
  31. return false;
  32. return parent::_isVisible($a);
  33. }
  34. }
  35. /** @} */