1
0

BxBaseMenuAccount.php 837 B

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