3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.6 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2015 |
7 +--------------------------------------------------------------------+
8 | This file is a part of CiviCRM. |
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. |
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. |
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 +--------------------------------------------------------------------+
29 * @copyright CiviCRM LLC (c) 2004-2015
31 * Generated from xml/schema/CRM/Contact/DashboardContact.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
34 require_once 'CRM/Core/DAO.php';
35 require_once 'CRM/Utils/Type.php';
36 class CRM_Contact_DAO_DashboardContact
extends CRM_Core_DAO
{
38 * static instance to hold the table name
42 static $_tableName = 'civicrm_dashboard_contact';
44 * static instance to hold the field values
48 static $_fields = null;
50 * static instance to hold the keys used in $_fields for each field.
54 static $_fieldKeys = null;
56 * static instance to hold the FK relationships
60 static $_links = null;
62 * static instance to hold the values that can
67 static $_import = null;
69 * static instance to hold the values that can
74 static $_export = null;
76 * static value to see if we should log any modifications to
77 * this table in the civicrm_log table
100 * column no for this widget
110 public $is_minimized;
116 public $is_fullscreen;
118 * Is this widget active?
124 * Ordering of the widgets.
136 * When was content populated
140 public $created_date;
144 * @return civicrm_dashboard_contact
146 function __construct() {
147 $this->__table
= 'civicrm_dashboard_contact';
148 parent
::__construct();
151 * Returns foreign keys and entity references
154 * [CRM_Core_Reference_Interface]
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');
162 return self
::$_links;
165 * Returns all the column names of this table
169 static function &fields() {
170 if (!(self
::$_fields)) {
171 self
::$_fields = array(
174 'type' => CRM_Utils_Type
::T_INT
,
175 'title' => ts('Dashboard Contact ID') ,
178 'dashboard_id' => array(
179 'name' => 'dashboard_id',
180 'type' => CRM_Utils_Type
::T_INT
,
181 'title' => ts('Dashboard') ,
182 'description' => 'Dashboard ID',
184 'FKClassName' => 'CRM_Core_DAO_Dashboard',
186 'contact_id' => array(
187 'name' => 'contact_id',
188 'type' => CRM_Utils_Type
::T_INT
,
189 'title' => ts('Dashboard Contact') ,
190 'description' => 'Contact ID',
192 'FKClassName' => 'CRM_Contact_DAO_Contact',
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',
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?',
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?',
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?',
221 'type' => CRM_Utils_Type
::T_INT
,
222 'title' => ts('Order') ,
223 'description' => 'Ordering of the widgets.',
227 'type' => CRM_Utils_Type
::T_LONGTEXT
,
228 'title' => ts('Content') ,
229 'description' => 'dashlet content',
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',
239 return self
::$_fields;
242 * Returns an array containing, for each field, the arary key used for that
243 * field in self::$_fields.
247 static function &fieldKeys() {
248 if (!(self
::$_fieldKeys)) {
249 self
::$_fieldKeys = array(
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',
262 return self
::$_fieldKeys;
265 * Returns the names of this table
269 static function getTableName() {
270 return self
::$_tableName;
273 * Returns if this table needs to be logged
281 * Returns the list of fields that can be imported
283 * @param bool $prefix
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)) {
294 self
::$_import['dashboard_contact'] = & $fields[$name];
296 self
::$_import[$name] = & $fields[$name];
301 return self
::$_import;
304 * Returns the list of fields that can be exported
306 * @param bool $prefix
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)) {
317 self
::$_export['dashboard_contact'] = & $fields[$name];
319 self
::$_export[$name] = & $fields[$name];
324 return self
::$_export;