[3594] | 1 | <?php |
---|
| 2 | /** |
---|
| 3 | * ProjectManager - Roles storage object |
---|
| 4 | * |
---|
| 5 | * @link http://www.egroupware.org |
---|
| 6 | * @author Ralf Becker <RalfBecker-AT-outdoor-training.de> |
---|
| 7 | * @package projectmanager |
---|
| 8 | * @copyright (c) 2005 by Ralf Becker <RalfBecker-AT-outdoor-training.de> |
---|
| 9 | * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License |
---|
| 10 | * @version $Id: class.soroles.inc.php 22355 2006-08-26 16:30:45Z ralfbecker $ |
---|
| 11 | */ |
---|
| 12 | |
---|
| 13 | include_once(PHPGW_INCLUDE_ROOT.'/etemplate/inc/class.so_sql.inc.php'); |
---|
| 14 | |
---|
| 15 | /** |
---|
| 16 | * Roles storage object of the projectmanager |
---|
| 17 | * |
---|
| 18 | * Tables: phpgw_pm_roles |
---|
| 19 | */ |
---|
| 20 | class soroles extends so_sql |
---|
| 21 | { |
---|
| 22 | /** |
---|
| 23 | * Constructor, calls the constructor of the extended class |
---|
| 24 | * |
---|
| 25 | * @param int $pm_id pm_id of the project to use, default null |
---|
| 26 | */ |
---|
| 27 | function soroles($pm_id=null) |
---|
| 28 | { |
---|
| 29 | $this->so_sql('projectmanager','phpgw_pm_roles'); |
---|
| 30 | |
---|
| 31 | if ((int) $pm_id) |
---|
| 32 | { |
---|
| 33 | $this->pm_id = (int) $pm_id; |
---|
| 34 | } |
---|
| 35 | } |
---|
| 36 | |
---|
| 37 | /** |
---|
| 38 | * reimplemented to set some defaults and order by 'pm_id DESC,role_acl DESC' |
---|
| 39 | * |
---|
| 40 | * @param string $value_col column-name for the values of the array, can also be an expression aliased with AS |
---|
| 41 | * @param string $key_col='' column-name for the keys, default '' = same as $value_col: returns a distinct list |
---|
| 42 | * @param array $filter=array() to filter the entries |
---|
| 43 | * @param string $order='' order, default '' = same as $value_col |
---|
| 44 | * @return array with key_col => value_col pairs |
---|
| 45 | */ |
---|
| 46 | function query_list($value_col='role_title',$key_col='role_id',$filter=array(),$order='pm_id DESC,role_acl DESC') |
---|
| 47 | { |
---|
| 48 | return parent::query_list($value_col,$key_col,$filter,$order); |
---|
| 49 | } |
---|
| 50 | } |
---|