param(':siteid',Config::siteid()) ->param(':gid',$gid); foreach ($query->execute() as $record) { $modules[$record['module']]['id'] = $record['MOD_ID']; $modules[$record['module']]['parent_id'] = $record['PARENT_ID']; $modules[$record['module']]['parent'] = $record['parent']; } return $modules; } /** * Display the methods available for a group */ public static function groupmethods($gid,$mid) { $methods = array(); // @todo the database prefix needs to be added to this query $query = DB::query(Database::SELECT,'SELECT C.id,C.name AS METHOD,A.name AS MODULE,C.page FROM ab_module A, ab_module_method C, ab_group_method D WHERE A.id=C.module_id AND A.site_id=C.site_id AND D.method_id=C.id AND D.site_id=C.site_id AND D.group_id=:gid AND C.module_id=:mid AND C.menu_display=1 AND A.site_id=:siteid') ->param(':siteid',Config::siteid()) ->param(':gid',$gid) ->param(':mid',$mid); foreach ($query->execute() as $record) { $methods[$record['METHOD']]['id'] = $record['id']; $methods[$record['METHOD']]['page'] = $record['page']; $methods[$record['METHOD']]['module'] = $record['MODULE']; } return $methods; } } ?>