3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.7 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2017 |
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-2017
31 * Generated from xml/schema/CRM/Contact/DashboardContact.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:5b6c6d2ccc579b98b3300c77898e596e)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
38 * CRM_Contact_DAO_DashboardContact constructor.
40 class CRM_Contact_DAO_DashboardContact
extends CRM_Core_DAO
{
42 * Static instance to hold the table name.
46 static $_tableName = 'civicrm_dashboard_contact';
48 * Should CiviCRM log any modifications to this table in the civicrm_log table.
71 * column no for this widget
77 * Is this widget active?
83 * Ordering of the widgets.
91 function __construct() {
92 $this->__table
= 'civicrm_dashboard_contact';
93 parent
::__construct();
96 * Returns foreign keys and entity references.
99 * [CRM_Core_Reference_Interface]
101 static function getReferenceColumns() {
102 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
103 Civi
::$statics[__CLASS__
]['links'] = static ::createReferenceColumns(__CLASS__
);
104 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName() , 'dashboard_id', 'civicrm_dashboard', 'id');
105 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName() , 'contact_id', 'civicrm_contact', 'id');
106 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
108 return Civi
::$statics[__CLASS__
]['links'];
111 * Returns all the column names of this table
115 static function &fields() {
116 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
117 Civi
::$statics[__CLASS__
]['fields'] = array(
120 'type' => CRM_Utils_Type
::T_INT
,
121 'title' => ts('Dashboard Contact ID') ,
123 'table_name' => 'civicrm_dashboard_contact',
124 'entity' => 'DashboardContact',
125 'bao' => 'CRM_Contact_BAO_DashboardContact',
127 'dashboard_id' => array(
128 'name' => 'dashboard_id',
129 'type' => CRM_Utils_Type
::T_INT
,
130 'title' => ts('Dashboard') ,
131 'description' => 'Dashboard ID',
133 'table_name' => 'civicrm_dashboard_contact',
134 'entity' => 'DashboardContact',
135 'bao' => 'CRM_Contact_BAO_DashboardContact',
136 'FKClassName' => 'CRM_Core_DAO_Dashboard',
138 'contact_id' => array(
139 'name' => 'contact_id',
140 'type' => CRM_Utils_Type
::T_INT
,
141 'title' => ts('Dashboard Contact') ,
142 'description' => 'Contact ID',
144 'table_name' => 'civicrm_dashboard_contact',
145 'entity' => 'DashboardContact',
146 'bao' => 'CRM_Contact_BAO_DashboardContact',
147 'FKClassName' => 'CRM_Contact_DAO_Contact',
149 'column_no' => array(
150 'name' => 'column_no',
151 'type' => CRM_Utils_Type
::T_BOOLEAN
,
152 'title' => ts('Column No') ,
153 'description' => 'column no for this widget',
154 'table_name' => 'civicrm_dashboard_contact',
155 'entity' => 'DashboardContact',
156 'bao' => 'CRM_Contact_BAO_DashboardContact',
158 'is_active' => array(
159 'name' => 'is_active',
160 'type' => CRM_Utils_Type
::T_BOOLEAN
,
161 'title' => ts('Dashlet is Active?') ,
162 'description' => 'Is this widget active?',
163 'table_name' => 'civicrm_dashboard_contact',
164 'entity' => 'DashboardContact',
165 'bao' => 'CRM_Contact_BAO_DashboardContact',
169 'type' => CRM_Utils_Type
::T_INT
,
170 'title' => ts('Order') ,
171 'description' => 'Ordering of the widgets.',
172 'table_name' => 'civicrm_dashboard_contact',
173 'entity' => 'DashboardContact',
174 'bao' => 'CRM_Contact_BAO_DashboardContact',
177 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
179 return Civi
::$statics[__CLASS__
]['fields'];
182 * Return a mapping from field-name to the corresponding key (as used in fields()).
185 * Array(string $name => string $uniqueName).
187 static function &fieldKeys() {
188 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
189 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
191 return Civi
::$statics[__CLASS__
]['fieldKeys'];
194 * Returns the names of this table
198 static function getTableName() {
199 return self
::$_tableName;
202 * Returns if this table needs to be logged
210 * Returns the list of fields that can be imported
212 * @param bool $prefix
216 static function &import($prefix = false) {
217 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'dashboard_contact', $prefix, array());
221 * Returns the list of fields that can be exported
223 * @param bool $prefix
227 static function &export($prefix = false) {
228 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'dashboard_contact', $prefix, array());