[ Index ] |
|
Code source de eGroupWare 1.2.106-2 |
[Code source] [Imprimer] [Statistiques]
(pas de description)
Poids: | 392 lignes (13 kb) |
Inclus ou requis: | 1 fois |
Référencé: | 0 fois |
Nécessite: | 1 fichier projectmanager/inc/class.sopricelist.inc.php |
bopricelist:: (10 méthodes):
bopricelist()
save()
search()
pricelist()
read()
delete()
check_acl()
prices_equal()
db2data()
data2db()
Classe: bopricelist - X-Ref
Pricelist buisness object of the projectmanagerbopricelist($pm_id=0) X-Ref |
Constructor, calls the constructor of the extended class param: int $pm_id=0 pm_id of the project to use, default 0 (project independent / standard prices) |
save($keys=null) X-Ref |
saves the content of data to the db, also checks acl and deletes not longer set prices! param: array $keys=null if given $keys are copied to data before saveing => allows a save as return: int/boolean 0 on success, true on missing acl-rights and errno != 0 else |
search($criteria,$only_keys=false,$order_by='',$extra_cols='',$wildcard='',$empty=False,$op='AND',$start=false,$filter=null,$join=true) X-Ref |
search elements, reimplemented to use $this->pm_id, if no pm_id given in criteria or filter and join with the prices table 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 default join with prices-table or string as in so_sql return: array of matching rows (the row is an array of the cols) or False |
pricelist($pm_id) X-Ref |
return priceslist of a given project (only bookable or billable price, no general pricelist) param: int $pm_id project return: array/boolean array with pl_id => pl_unit: pl_tiltle (pl_price) pairs or false on error (eg. no ACL) |
read($keys,$extra_cols='',$join=true) X-Ref |
reads one pricelist-itme specified by $keys, reimplemented to use $this->pm_id, if no pm_id given param: array $keys array with keys in form internalName => value, may be a scalar value if only one key param: string/array $extra_cols string or array of strings to be added to the SELECT, eg. "count(*) as num" param: string/boolean $join=true default join with links-table or string as in so_sql return: array/boolean data if row could be retrived else False |
delete($keys) X-Ref |
delete pricelist-entries and price(s) specified by keys pl_id, pm_id and/or pl_validsince If the last price of a pricelist-entry gets deleted, the pricelist entry is automatic deleted too! param: array/int $keys array with keys pm_id, pl_id and/or pl_validsince to delete or integer pm_id return: int/boolean number of deleted prices or false if permission denied |
check_acl($required,$pm_id=0,$data=null) X-Ref |
checks if the user has sufficent rights for a certain action For project-spez. prices/data you need a EGW_ACL_BUDGET right of the project for read or EGW_ACL_EDIT_BUDGET for write or delete. For general pricelist data you need atm. no extra read rights, but is_admin to write/delete. param: int $required EGW_ACL_{READ|WRITE|DELETE} param: int $pm_id=0 project-id for project-spez. prices/data to check, default 0 = general pricelist param: array/int $data=null data/id of pricelist-entry, default null = use $this->data ($pm_id is ignored) return: boolean true if the user has the rights, false otherwise |
prices_equal($price,$price2) X-Ref |
Compares two prices to check if they are equal The compared fields depend on the price being project-specific or not param: array $price param: array $price2 return: boolean true if the two prices are identical, false otherwise or if they are no arrays! |
db2data($data=null) X-Ref |
changes the data from the db-format to your work-format reimplemented to adjust the timezone of the timestamps (adding $this->tz_offset_s to get user-time) Please note, we do NOT call the method of the parent or so_sql !!! param: array $data if given works on that array and returns result, else works on internal data-array return: array with changed data |
data2db($data=null) X-Ref |
changes the data from your work-format to the db-format reimplemented to adjust the timezone of the timestamps (subtraction $this->tz_offset_s to get server-time) Please note, we do NOT call the method of the parent or so_sql !!! param: array $data if given works on that array and returns result, else works on internal data-array return: array with changed data |
Généré le : Sun Feb 25 17:20:01 2007 | par Balluche grâce à PHPXref 0.7 |