source: sandbox/2.3-MailArchiver/contactcenter/inc/class.so_contact_relation_type.inc.php @ 6779

Revision 6779, 2.4 KB checked in by rafaelraymundo, 12 years ago (diff)

Ticket #2946 - Liberado Expresso(branch 2.3) integrado ao MailArchiver?.

Line 
1<?php
2  /***************************************************************************\
3  * eGroupWare - Contacts Center                                              *
4  * http://www.egroupware.org                                                 *
5  *                                                                           *
6  * Storage Object Classes                                                    *
7  * Written by:                                                               *
8  *  - Raphael Derosso Pereira <raphaelpereira@users.sourceforge.net>         *
9  *  sponsored by Thyamad - http://www.thyamad.com                            *
10  * ------------------------------------------------------------------------- *
11  *  This program is free software; you can redistribute it and/or modify it  *
12  *  under the terms of the GNU General Public License as published by the    *
13  *  Free Software Foundation; either version 2 of the License, or (at your   *
14  *  option) any later version.                                               *
15  \***************************************************************************/
16
17
18        include_once( "class.so_relation_type.inc.php" );
19       
20        class so_contact_relation_type extends so_relation_type
21        {
22       
23                function so_contact_relation_type ( $id = false )
24                {
25                        $this->init();
26                       
27                        $this->main_fields = array(
28                                'id_typeof_contact_relation' => array(
29                                        'name'  => 'id_typeof_contact_relation',
30                                        'type'  => 'primary',
31                                        'state' => 'empty',
32                                        'value' => &$this->id
33                                ),
34                                'contact_relation_type_name' => array(
35                                        'name'  => 'contact_relation_type_name',
36                                        'type'  => false,
37                                        'state' => 'empty',
38                                        'value' => false
39                                ),
40                                'contact_relation_is_subordinated' => array(
41                                        'name'  => 'contact_relation_is_subordinated',
42                                        'type'  => false,
43                                        'state' => 'empty',
44                                        'value' => false
45                                )
46                        );
47
48                        $this->type_name = & $this->main_fields['contact_relation_type_name'];
49                        $this->is_subordinated = & $this->main_fields['contact_relation_is_subordinated'];
50
51                        $this->db_tables = array(
52                                'phpgw_cc_typeof_ct_rels' => array(
53                                        'type'   => 'main',
54                                        'keys'   => array(
55                                                'primary' => array(&$this->main_fields['id_typeof_contact_relation']),
56                                                'foreign' => false
57                                        ),
58                                        'fields' => & $this->main_fields
59                                )
60                        );
61                       
62                        if ($id)
63                        {
64                                if (!$this->checkout($id))
65                                {
66                                        $this->reset_values();
67                                        $this->state = 'new';
68                                }
69                        }
70                        else
71                        {
72                                $this->state = 'new';
73                        }
74                }
75       
76        }
77?>
Note: See TracBrowser for help on using the repository browser.