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:21ce0d18eb988e90850ba4f5e56c161f)
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') ,
124 'dashboard_id' => array(
125 'name' => 'dashboard_id',
126 'type' => CRM_Utils_Type
::T_INT
,
127 'title' => ts('Dashboard') ,
128 'description' => 'Dashboard ID',
130 'FKClassName' => 'CRM_Core_DAO_Dashboard',
132 'contact_id' => array(
133 'name' => 'contact_id',
134 'type' => CRM_Utils_Type
::T_INT
,
135 'title' => ts('Dashboard Contact') ,
136 'description' => 'Contact ID',
138 'FKClassName' => 'CRM_Contact_DAO_Contact',
140 'column_no' => array(
141 'name' => 'column_no',
142 'type' => CRM_Utils_Type
::T_BOOLEAN
,
143 'title' => ts('Column No') ,
144 'description' => 'column no for this widget',
146 'is_active' => array(
147 'name' => 'is_active',
148 'type' => CRM_Utils_Type
::T_BOOLEAN
,
149 'title' => ts('Dashlet is Active?') ,
150 'description' => 'Is this widget active?',
154 'type' => CRM_Utils_Type
::T_INT
,
155 'title' => ts('Order') ,
156 'description' => 'Ordering of the widgets.',
159 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
161 return Civi
::$statics[__CLASS__
]['fields'];
164 * Return a mapping from field-name to the corresponding key (as used in fields()).
167 * Array(string $name => string $uniqueName).
169 static function &fieldKeys() {
170 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
171 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
173 return Civi
::$statics[__CLASS__
]['fieldKeys'];
176 * Returns the names of this table
180 static function getTableName() {
181 return self
::$_tableName;
184 * Returns if this table needs to be logged
192 * Returns the list of fields that can be imported
194 * @param bool $prefix
198 static function &import($prefix = false) {
199 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'dashboard_contact', $prefix, array());
203 * Returns the list of fields that can be exported
205 * @param bool $prefix
209 static function &export($prefix = false) {
210 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'dashboard_contact', $prefix, array());