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/Core/Dashboard.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:6b7454609bac684a5d32597cdd433f3d)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
38 * CRM_Core_DAO_Dashboard constructor.
40 class CRM_Core_DAO_Dashboard
extends CRM_Core_DAO
{
42 * Static instance to hold the table name.
46 static $_tableName = 'civicrm_dashboard';
48 * Should CiviCRM log any modifications to this table in the civicrm_log table.
59 * Domain for dashboard
65 * Internal name of dashlet.
77 * url in case of external dashlet
83 * Permission for the dashlet
93 public $permission_operator;
95 * fullscreen url for dashlet
99 public $fullscreen_url;
101 * Is this dashlet active?
107 * Is this dashlet reserved?
113 * Number of minutes to cache dashlet content in browser localStorage.
117 public $cache_minutes;
121 function __construct() {
122 $this->__table
= 'civicrm_dashboard';
123 parent
::__construct();
126 * Returns foreign keys and entity references.
129 * [CRM_Core_Reference_Interface]
131 static function getReferenceColumns() {
132 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
133 Civi
::$statics[__CLASS__
]['links'] = static ::createReferenceColumns(__CLASS__
);
134 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName() , 'domain_id', 'civicrm_domain', 'id');
135 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
137 return Civi
::$statics[__CLASS__
]['links'];
140 * Returns all the column names of this table
144 static function &fields() {
145 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
146 Civi
::$statics[__CLASS__
]['fields'] = array(
149 'type' => CRM_Utils_Type
::T_INT
,
150 'title' => ts('DashletID') ,
152 'table_name' => 'civicrm_dashboard',
153 'entity' => 'Dashboard',
154 'bao' => 'CRM_Core_BAO_Dashboard',
157 'domain_id' => array(
158 'name' => 'domain_id',
159 'type' => CRM_Utils_Type
::T_INT
,
160 'title' => ts('Dashlet Domain') ,
161 'description' => 'Domain for dashboard',
163 'table_name' => 'civicrm_dashboard',
164 'entity' => 'Dashboard',
165 'bao' => 'CRM_Core_BAO_Dashboard',
167 'FKClassName' => 'CRM_Core_DAO_Domain',
168 'pseudoconstant' => array(
169 'table' => 'civicrm_domain',
171 'labelColumn' => 'name',
176 'type' => CRM_Utils_Type
::T_STRING
,
177 'title' => ts('Dashlet Name') ,
178 'description' => 'Internal name of dashlet.',
180 'size' => CRM_Utils_Type
::BIG
,
181 'table_name' => 'civicrm_dashboard',
182 'entity' => 'Dashboard',
183 'bao' => 'CRM_Core_BAO_Dashboard',
188 'type' => CRM_Utils_Type
::T_STRING
,
189 'title' => ts('Dashlet Title') ,
190 'description' => 'dashlet title',
192 'size' => CRM_Utils_Type
::HUGE
,
193 'table_name' => 'civicrm_dashboard',
194 'entity' => 'Dashboard',
195 'bao' => 'CRM_Core_BAO_Dashboard',
200 'type' => CRM_Utils_Type
::T_STRING
,
201 'title' => ts('Dashlet URL') ,
202 'description' => 'url in case of external dashlet',
204 'size' => CRM_Utils_Type
::HUGE
,
205 'table_name' => 'civicrm_dashboard',
206 'entity' => 'Dashboard',
207 'bao' => 'CRM_Core_BAO_Dashboard',
210 'permission' => array(
211 'name' => 'permission',
212 'type' => CRM_Utils_Type
::T_STRING
,
213 'title' => ts('Dashlet Permission') ,
214 'description' => 'Permission for the dashlet',
216 'size' => CRM_Utils_Type
::HUGE
,
217 'table_name' => 'civicrm_dashboard',
218 'entity' => 'Dashboard',
219 'bao' => 'CRM_Core_BAO_Dashboard',
222 'permission_operator' => array(
223 'name' => 'permission_operator',
224 'type' => CRM_Utils_Type
::T_STRING
,
225 'title' => ts('Dashlet Permission Operator') ,
226 'description' => 'Permission Operator',
228 'size' => CRM_Utils_Type
::FOUR
,
229 'table_name' => 'civicrm_dashboard',
230 'entity' => 'Dashboard',
231 'bao' => 'CRM_Core_BAO_Dashboard',
234 'fullscreen_url' => array(
235 'name' => 'fullscreen_url',
236 'type' => CRM_Utils_Type
::T_STRING
,
237 'title' => ts('Fullscreen URL') ,
238 'description' => 'fullscreen url for dashlet',
240 'size' => CRM_Utils_Type
::HUGE
,
241 'table_name' => 'civicrm_dashboard',
242 'entity' => 'Dashboard',
243 'bao' => 'CRM_Core_BAO_Dashboard',
246 'is_active' => array(
247 'name' => 'is_active',
248 'type' => CRM_Utils_Type
::T_BOOLEAN
,
249 'title' => ts('Is Dashlet Active?') ,
250 'description' => 'Is this dashlet active?',
251 'table_name' => 'civicrm_dashboard',
252 'entity' => 'Dashboard',
253 'bao' => 'CRM_Core_BAO_Dashboard',
256 'is_reserved' => array(
257 'name' => 'is_reserved',
258 'type' => CRM_Utils_Type
::T_BOOLEAN
,
259 'title' => ts('Is Dashlet Reserved?') ,
260 'description' => 'Is this dashlet reserved?',
261 'table_name' => 'civicrm_dashboard',
262 'entity' => 'Dashboard',
263 'bao' => 'CRM_Core_BAO_Dashboard',
266 'cache_minutes' => array(
267 'name' => 'cache_minutes',
268 'type' => CRM_Utils_Type
::T_INT
,
269 'title' => ts('Cache Minutes') ,
270 'description' => 'Number of minutes to cache dashlet content in browser localStorage.',
273 'table_name' => 'civicrm_dashboard',
274 'entity' => 'Dashboard',
275 'bao' => 'CRM_Core_BAO_Dashboard',
279 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
281 return Civi
::$statics[__CLASS__
]['fields'];
284 * Return a mapping from field-name to the corresponding key (as used in fields()).
287 * Array(string $name => string $uniqueName).
289 static function &fieldKeys() {
290 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
291 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
293 return Civi
::$statics[__CLASS__
]['fieldKeys'];
296 * Returns the names of this table
300 static function getTableName() {
301 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
304 * Returns if this table needs to be logged
312 * Returns the list of fields that can be imported
314 * @param bool $prefix
318 static function &import($prefix = false) {
319 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'dashboard', $prefix, array());
323 * Returns the list of fields that can be exported
325 * @param bool $prefix
329 static function &export($prefix = false) {
330 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'dashboard', $prefix, array());
334 * Returns the list of indices
336 public static function indices($localize = TRUE) {
338 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;