[ Index ] |
|
Code source de eGroupWare 1.2.106-2 |
[Code source] [Imprimer] [Statistiques]
(pas de description)
Poids: | 711 lignes (22 kb) |
Inclus ou requis: | 0 fois |
Référencé: | 0 fois |
Nécessite: | 0 fichiers |
categories:: (17 méthodes):
categories()
filter()
total()
return_all_children()
return_array()
return_sorted_array()
return_single()
formatted_list()
formated_list()
add()
delete()
edit()
name2id()
id2name()
return_name()
exists()
change_owner()
Classe: categories - X-Ref
class to manage categories in eGroupWarecategories($accountid='',$app_name = '') X-Ref |
constructor for categories class param: int/string $accountid='' account id or lid, default to current user param: string $app_name='' app name defaults to current app |
filter($type) X-Ref |
return sql for predifined filters param: string $type eiterh subs, mains, appandmains, appandsubs, noglobal or noglobalapp return: string with sql to add to the where clause |
total($for = 'app') X-Ref |
returns the total number of categories for app, subs or mains param: $for one of either 'app' 'subs' or 'mains' return: integer count of categories |
return_all_children($cat_id) X-Ref |
return_all_children returns array with id's of all children from $cat_id and $cat_id itself! param: $cat_id integer cat-id to search for return: array of cat-id's |
return_array($type,$start,$limit = True,$query = '',$sort = '',$order = '',$globals = False, $parent_id = '', $lastmod = -1, $column = '') X-Ref |
return an array populated with categories param: string $type defaults to 'all' param: int $start see $limit param: boolean $limit if true limited query starting with $start param: string $query='' query-pattern param: string $sort='' sort order, either defaults to 'ASC' param: string $order='' order by param: boolean $globals includes the global egroupware categories or not param: int $parent_id=0 if > 0 return subcats or $parent_id param: int $lastmod = -1 if > 0 return only cats modified since then param: string $column='' if column-name given only that column is returned, not the full array with all cat-data return: array or cats |
return_sorted_array($start,$limit=True,$query='',$sort='',$order='',$globals=False, $parent_id=0) X-Ref |
return a sorted array populated with categories param: int $start see $limit param: boolean $limit if true limited query starting with $start param: string $query='' query-pattern param: string $sort='' sort order, either defaults to 'ASC' param: string $order='' order by param: boolean $globals includes the global egroupware categories or not param: int $parent_id=0 if > 0 return subcats or $parent_id return: array with cats |
return_single($id = '') X-Ref |
read a single category We use a shared cache together with id2name param: int $id id of category return: array/boolean array with one array of cat-data or false if cat not found |
formatted_list($format,$type='',$selected = '',$globals = False,$site_link = 'site') X-Ref |
return into a select box, list or other formats param: string/array $format string 'select' or 'list', or array with all params param: string $type='' subs or mains param: int/array $selected - cat_id or array with cat_id values param: boolean $globals True or False, includes the global egroupware categories or not return: string populated with categories |
formated_list($format,$type='',$selected = '',$globals = False,$site_link = 'site') X-Ref |
add($values) X-Ref |
add a category param: array $value cat-data return: int new cat-id |
delete($cat_id, $drop_subs = False, $modify_subs = False) X-Ref |
delete a category param: int $cat_id category id param: boolean $drop_subs=false if true delete sub-cats too param: boolean $modify_subs=false if true make the subs owned by the parent of $cat_id |
edit($values) X-Ref |
edit / update a category param: array $values array with cat-data (it need to be complete, as everything get's written) return: int cat-id |
name2id($cat_name) X-Ref |
return category id for a given name, only application cat, which are global or owned by the user are returned! param: string $cat_name cat-name return: int cat-id or 0 if not found |
id2name($cat_id=0, $item='name') X-Ref |
return category information for a given id We use a shared cache together with return_single param: int $cat_id=0 cat-id param: string $item='name requested information return: string information or '--' if not found or !$cat_id |
return_name($cat_id) X-Ref |
return category name for a given id param: int $cat_id return: string cat_name category name |
exists($type,$cat_name = '',$cat_id = 0,$parent = 0) X-Ref |
check if a category id and/or name exists, if id AND name are given the check is for a category with same name and different id (!) param: string $type subs or mains param: string $cat_name='' category name param: int $cat_id=0 category id param: int $parent=0 category id of parent return: int/boolean cat_id or false if cat not exists |
change_owner($owner,$to=0,$app='') X-Ref |
Change the owner of all cats owned by $owner to $to OR deletes them if !$to param: int $owner owner or the cats to delete or change param: int $to=0 new owner or 0 to delete the cats param: string $app='' if given only cats matching $app are modifed/deleted |
Généré le : Sun Feb 25 17:20:01 2007 | par Balluche grâce à PHPXref 0.7 |