if ($yj_item_type == 1 && $item->level > $allow_level && !empty($yj_mod_id)) { // CHECK: custom module name is given by the title field, otherwise it's just 'om' ?? //check if we have multiple modules selected if (!is_array($yj_mod_id)) { $yj_mod_id = array($yj_mod_id); } $item_link_array = array(); foreach ($yj_mod_id as $yj_mod_id_value) { //get the module name $query = 'SELECT module, title ' . ' FROM #__modules AS m' . ' WHERE 1 ' . ' AND m.client_id = 0' . ' AND m.id = ' . (int) $yj_mod_id_value; $db->setQuery($query); $module_details = $db->loadObjectList(); if ($module_details[0]->module == 'mod_custom') { $yj_module = YJModuleHelper::getModule('custom', $module_details[0]->title); } else { $yj_module = YJModuleHelper::getModule(strtolower(substr($module_details[0]->module, 4, strlen($module_details[0]->module))), $module_details[0]->title); } $yj_attribs['yj_style'] = 'YJsgxhtml'; $yj_load_mod = YJModuleHelper::renderModule($yj_module, $yj_attribs); $yj_load_mod_class = ' has_module'; $item_link_array[] = '' . $yj_module_details . '<div class="yjm_module">' . $yj_load_mod . '</div>'; if ($yj_mega_menus && isset($yj_pgroup_holder) && $yj_pgroup_holder == 1 && isset($yj_psub_width) && !empty($yj_psub_width)) { $subswidth = trim($yj_sub_group_width_array[$child_rows[$item->parent_id][$item->id]]); $yj_load_mod_class = ' has_module holdsgroup" style="width:' . $subswidth . 'px!important;'; $addGroupTitleClass = ' holdsgroupTitle '; } } $item_link = implode($item_link_array); } elseif ($yj_item_type == 2 && $item->level > $allow_level && !empty($yj_position)) { if (!is_array($yj_position)) { $yj_position = array($yj_position);
/** * Checks if a module is enabled * * @param string The module name * * @return boolean */ public static function isEnabled($module) { $result = YJModuleHelper::getModule($module); return !is_null($result); }