commiting uncommited changes on live site
[weblabels.fsf.org.git] / crm.fsf.org / 20131203 / files / sites / all / modules-old / civicrm / CRM / Contact / DAO / DashboardContact.php
1 <?php
2 /*
3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.6 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2015 |
7 +--------------------------------------------------------------------+
8 | This file is a part of CiviCRM. |
9 | |
10 | CiviCRM is free software; you can copy, modify, and distribute it |
11 | under the terms of the GNU Affero General Public License |
12 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
13 | |
14 | CiviCRM is distributed in the hope that it will be useful, but |
15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
17 | See the GNU Affero General Public License for more details. |
18 | |
19 | You should have received a copy of the GNU Affero General Public |
20 | License and the CiviCRM Licensing Exception along |
21 | with this program; if not, contact CiviCRM LLC |
22 | at info[AT]civicrm[DOT]org. If you have questions about the |
23 | GNU Affero General Public License or the licensing of CiviCRM, |
24 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
25 +--------------------------------------------------------------------+
26 */
27 /**
28 * @package CRM
29 * @copyright CiviCRM LLC (c) 2004-2015
30 *
31 * Generated from xml/schema/CRM/Contact/DashboardContact.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 */
34 require_once 'CRM/Core/DAO.php';
35 require_once 'CRM/Utils/Type.php';
36 class CRM_Contact_DAO_DashboardContact extends CRM_Core_DAO {
37 /**
38 * static instance to hold the table name
39 *
40 * @var string
41 */
42 static $_tableName = 'civicrm_dashboard_contact';
43 /**
44 * static instance to hold the field values
45 *
46 * @var array
47 */
48 static $_fields = null;
49 /**
50 * static instance to hold the keys used in $_fields for each field.
51 *
52 * @var array
53 */
54 static $_fieldKeys = null;
55 /**
56 * static instance to hold the FK relationships
57 *
58 * @var string
59 */
60 static $_links = null;
61 /**
62 * static instance to hold the values that can
63 * be imported
64 *
65 * @var array
66 */
67 static $_import = null;
68 /**
69 * static instance to hold the values that can
70 * be exported
71 *
72 * @var array
73 */
74 static $_export = null;
75 /**
76 * static value to see if we should log any modifications to
77 * this table in the civicrm_log table
78 *
79 * @var boolean
80 */
81 static $_log = false;
82 /**
83 *
84 * @var int unsigned
85 */
86 public $id;
87 /**
88 * Dashboard ID
89 *
90 * @var int unsigned
91 */
92 public $dashboard_id;
93 /**
94 * Contact ID
95 *
96 * @var int unsigned
97 */
98 public $contact_id;
99 /**
100 * column no for this widget
101 *
102 * @var boolean
103 */
104 public $column_no;
105 /**
106 * Is Minimized?
107 *
108 * @var boolean
109 */
110 public $is_minimized;
111 /**
112 * Is Fullscreen?
113 *
114 * @var boolean
115 */
116 public $is_fullscreen;
117 /**
118 * Is this widget active?
119 *
120 * @var boolean
121 */
122 public $is_active;
123 /**
124 * Ordering of the widgets.
125 *
126 * @var int
127 */
128 public $weight;
129 /**
130 * dashlet content
131 *
132 * @var longtext
133 */
134 public $content;
135 /**
136 * When was content populated
137 *
138 * @var datetime
139 */
140 public $created_date;
141 /**
142 * class constructor
143 *
144 * @return civicrm_dashboard_contact
145 */
146 function __construct() {
147 $this->__table = 'civicrm_dashboard_contact';
148 parent::__construct();
149 }
150 /**
151 * Returns foreign keys and entity references
152 *
153 * @return array
154 * [CRM_Core_Reference_Interface]
155 */
156 static function getReferenceColumns() {
157 if (!self::$_links) {
158 self::$_links = static ::createReferenceColumns(__CLASS__);
159 self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'dashboard_id', 'civicrm_dashboard', 'id');
160 self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'contact_id', 'civicrm_contact', 'id');
161 }
162 return self::$_links;
163 }
164 /**
165 * Returns all the column names of this table
166 *
167 * @return array
168 */
169 static function &fields() {
170 if (!(self::$_fields)) {
171 self::$_fields = array(
172 'id' => array(
173 'name' => 'id',
174 'type' => CRM_Utils_Type::T_INT,
175 'title' => ts('Dashboard Contact ID') ,
176 'required' => true,
177 ) ,
178 'dashboard_id' => array(
179 'name' => 'dashboard_id',
180 'type' => CRM_Utils_Type::T_INT,
181 'title' => ts('Dashboard') ,
182 'description' => 'Dashboard ID',
183 'required' => true,
184 'FKClassName' => 'CRM_Core_DAO_Dashboard',
185 ) ,
186 'contact_id' => array(
187 'name' => 'contact_id',
188 'type' => CRM_Utils_Type::T_INT,
189 'title' => ts('Dashboard Contact') ,
190 'description' => 'Contact ID',
191 'required' => true,
192 'FKClassName' => 'CRM_Contact_DAO_Contact',
193 ) ,
194 'column_no' => array(
195 'name' => 'column_no',
196 'type' => CRM_Utils_Type::T_BOOLEAN,
197 'title' => ts('Column No') ,
198 'description' => 'column no for this widget',
199 ) ,
200 'is_minimized' => array(
201 'name' => 'is_minimized',
202 'type' => CRM_Utils_Type::T_BOOLEAN,
203 'title' => ts('Dashlet is Minimized?') ,
204 'description' => 'Is Minimized?',
205 ) ,
206 'is_fullscreen' => array(
207 'name' => 'is_fullscreen',
208 'type' => CRM_Utils_Type::T_BOOLEAN,
209 'title' => ts('Dashlet is FullScreen?') ,
210 'description' => 'Is Fullscreen?',
211 'default' => '1',
212 ) ,
213 'is_active' => array(
214 'name' => 'is_active',
215 'type' => CRM_Utils_Type::T_BOOLEAN,
216 'title' => ts('Dashlet is Active?') ,
217 'description' => 'Is this widget active?',
218 ) ,
219 'weight' => array(
220 'name' => 'weight',
221 'type' => CRM_Utils_Type::T_INT,
222 'title' => ts('Order') ,
223 'description' => 'Ordering of the widgets.',
224 ) ,
225 'content' => array(
226 'name' => 'content',
227 'type' => CRM_Utils_Type::T_LONGTEXT,
228 'title' => ts('Content') ,
229 'description' => 'dashlet content',
230 ) ,
231 'created_date' => array(
232 'name' => 'created_date',
233 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
234 'title' => ts('Dashlet Created On') ,
235 'description' => 'When was content populated',
236 ) ,
237 );
238 }
239 return self::$_fields;
240 }
241 /**
242 * Returns an array containing, for each field, the arary key used for that
243 * field in self::$_fields.
244 *
245 * @return array
246 */
247 static function &fieldKeys() {
248 if (!(self::$_fieldKeys)) {
249 self::$_fieldKeys = array(
250 'id' => 'id',
251 'dashboard_id' => 'dashboard_id',
252 'contact_id' => 'contact_id',
253 'column_no' => 'column_no',
254 'is_minimized' => 'is_minimized',
255 'is_fullscreen' => 'is_fullscreen',
256 'is_active' => 'is_active',
257 'weight' => 'weight',
258 'content' => 'content',
259 'created_date' => 'created_date',
260 );
261 }
262 return self::$_fieldKeys;
263 }
264 /**
265 * Returns the names of this table
266 *
267 * @return string
268 */
269 static function getTableName() {
270 return self::$_tableName;
271 }
272 /**
273 * Returns if this table needs to be logged
274 *
275 * @return boolean
276 */
277 function getLog() {
278 return self::$_log;
279 }
280 /**
281 * Returns the list of fields that can be imported
282 *
283 * @param bool $prefix
284 *
285 * @return array
286 */
287 static function &import($prefix = false) {
288 if (!(self::$_import)) {
289 self::$_import = array();
290 $fields = self::fields();
291 foreach($fields as $name => $field) {
292 if (CRM_Utils_Array::value('import', $field)) {
293 if ($prefix) {
294 self::$_import['dashboard_contact'] = & $fields[$name];
295 } else {
296 self::$_import[$name] = & $fields[$name];
297 }
298 }
299 }
300 }
301 return self::$_import;
302 }
303 /**
304 * Returns the list of fields that can be exported
305 *
306 * @param bool $prefix
307 *
308 * @return array
309 */
310 static function &export($prefix = false) {
311 if (!(self::$_export)) {
312 self::$_export = array();
313 $fields = self::fields();
314 foreach($fields as $name => $field) {
315 if (CRM_Utils_Array::value('export', $field)) {
316 if ($prefix) {
317 self::$_export['dashboard_contact'] = & $fields[$name];
318 } else {
319 self::$_export[$name] = & $fields[$name];
320 }
321 }
322 }
323 }
324 return self::$_export;
325 }
326 }