protected function getListQuery() { $this->setState('filter.menutype', null); $query = parent::getListQuery(); return $query; }
function _hidePrivacyMenus() { if (false == $this->_pluginHandler->isPrivacyAllow()) { return; } //get Privacy menu if (XIPT_JOOMLA_15) { $menus = JSite::getMenu(); } else { //$menus = JApplication::getMenu('site'); //XiTODO::Improve this code; include_once JPATH_ROOT . DS . 'administrator/components/com_menus/models/items.php'; $menus = new MenusModelItems(); } $menusItems = $menus->getItems('menutype', CFactory::getConfig()->get('toolbar_menutype')); if (empty($menusItems)) { return; } foreach ($menusItems as $menu) { if (JString::stristr($menu->link, 'index.php?option=com_community&view=profile&task=privacy')) { $hideMenu = XiptRoute::_("{$menu->link}"); break; } } if (empty($hideMenu)) { return; } ob_start(); ?> joms.jQuery(document).ready(function(){ var menuUrl = "<?php echo $hideMenu; ?> ".replace(/\&\;/gi, "&"); joms.jQuery("a[href='" + menuUrl + "']").hide(); }); <?php $content = ob_get_contents(); ob_clean(); JFactory::getDocument()->addScriptDeclaration($content); }