[ Index ]
 

Code source de eGroupWare 1.2.106-2

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/projectmanager/inc/ -> class.soprojectmanager.inc.php (sommaire)

(pas de description)

Poids: 366 lignes (13 kb)
Inclus ou requis: 1 fois
Référencé: 0 fois
Nécessite: 1 fichier
 etemplate/inc/class.so_sql.inc.php

Définit 1 class

soprojectmanager:: (8 méthodes):
  soprojectmanager()
  read()
  save()
  data_merge()
  search()
  query_list()
  get_availibility()
  set_availibility()


Classe: soprojectmanager  - X-Ref

General storage object of the projectmanager: access the main project data

Tables: egw_pm_projects, egw_pm_extra, egw_pm_roles, egw_pm_members

A project P is the parent of an other project C, if link_id1=P.pm_id and link_id2=C.pm_id !

soprojectmanager($pm_id=null)   X-Ref
Constructor, calls the constructor of the extended class

param: int $pm_id id of the project to load, default null

read($keys)   X-Ref
reads a project

reimplemented to handle custom fields

save($keys=null)   X-Ref
saves a project

reimplemented to handle custom fields and set modification and creation data

param: array $keys if given $keys are copied to data before saveing => allows a save as
return: int 0 on success and errno != 0 else

data_merge($new)   X-Ref
merges in new values from the given new data-array

reimplemented to also merge the customfields

param: $new array in form col => new_value with values to set

search($criteria,$only_keys=True,$order_by='',$extra_cols='',$wildcard='',$empty=False,$op='AND',$start=false,$filter=null,$join=true,$need_full_no_count=false)   X-Ref
search projects, re-implemented to include sub-cats and allow to filter for subs and mains

param: array/string $criteria array of key and data cols, OR a SQL query (content for WHERE), fully quoted (!)
param: boolean $only_keys True returns only keys, False returns all cols
param: string $order_by fieldnames + {ASC|DESC} separated by colons ','
param: string/array $extra_cols string or array of strings to be added to the SELECT, eg. "count(*) as num"
param: string $wildcard appended befor and after each criteria
param: boolean $empty False=empty criteria are ignored in query, True=empty have to be empty in row
param: string $op defaults to 'AND', can be set to 'OR' too, then criteria's are OR'ed together
param: int/boolean $start if != false, return only maxmatch rows begining with start
param: array $filter if set (!=null) col-data pairs, to be and-ed (!) into the query without wildcards
param: string/boolean $join=true sql to do a join, added as is after the table-name, default true=add join for acl
return: array of matching rows (the row is an array of the cols) or False

query_list($value_col='pm_title',$key_col='pm_id',$filter=array('pm_status'=>'active')   X-Ref
reimplemented to set some defaults and cope with ambigues pm_id column

param: string $value_col='pm_title' column-name for the values of the array, can also be an expression aliased with AS
param: string $key_col='pm_id' column-name for the keys, default '' = same as $value_col: returns a distinct list
param: array $filter=array() to filter the entries
return: array with key_col => value_col pairs, ordered by value_col

get_availibility($uid=0)   X-Ref
read the general availebility of one or all users

A not set availibility is by default 100%

param: int $uid user-id or 0 to read all
return: array uid => availibility

set_availibility($uid,$availibility=null)   X-Ref
set or delete the general availibility of a user

A not set availibility is by default 100%

param: int $uid user-id
param: float $availiblity=null percentage to set or nothing to delete the avail. for the user



Généré le : Sun Feb 25 17:20:01 2007 par Balluche grâce à PHPXref 0.7