5 * @copyright CiviCRM LLC https://civicrm.org/licensing
7 * Generated from xml/schema/CRM/Core/Dashboard.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
9 * (GenCodeChecksum:8cc83b4a4fa0fe28868e33887824c4e5)
13 * Database access object for the Dashboard entity.
15 class CRM_Core_DAO_Dashboard
extends CRM_Core_DAO
{
18 * Static instance to hold the table name.
22 public static $_tableName = 'civicrm_dashboard';
25 * Should CiviCRM log any modifications to this table in the civicrm_log table.
29 public static $_log = FALSE;
37 * Domain for dashboard
44 * Internal name of dashlet.
58 * url in case of external dashlet
65 * Permission for the dashlet
76 public $permission_operator;
79 * fullscreen url for dashlet
83 public $fullscreen_url;
86 * Is this dashlet active?
93 * Is this dashlet reserved?
100 * Number of minutes to cache dashlet content in browser localStorage.
104 public $cache_minutes;
109 public function __construct() {
110 $this->__table
= 'civicrm_dashboard';
111 parent
::__construct();
115 * Returns localized title of this entity.
117 public static function getEntityTitle() {
118 return ts('Dashboards');
122 * Returns foreign keys and entity references.
125 * [CRM_Core_Reference_Interface]
127 public static function getReferenceColumns() {
128 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
129 Civi
::$statics[__CLASS__
]['links'] = static::createReferenceColumns(__CLASS__
);
130 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'domain_id', 'civicrm_domain', 'id');
131 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
133 return Civi
::$statics[__CLASS__
]['links'];
137 * Returns all the column names of this table
141 public static function &fields() {
142 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
143 Civi
::$statics[__CLASS__
]['fields'] = [
146 'type' => CRM_Utils_Type
::T_INT
,
147 'title' => ts('DashletID'),
149 'where' => 'civicrm_dashboard.id',
150 'table_name' => 'civicrm_dashboard',
151 'entity' => 'Dashboard',
152 'bao' => 'CRM_Core_BAO_Dashboard',
157 'name' => 'domain_id',
158 'type' => CRM_Utils_Type
::T_INT
,
159 'title' => ts('Dashlet Domain'),
160 'description' => ts('Domain for dashboard'),
162 'where' => 'civicrm_dashboard.domain_id',
163 'table_name' => 'civicrm_dashboard',
164 'entity' => 'Dashboard',
165 'bao' => 'CRM_Core_BAO_Dashboard',
167 'FKClassName' => 'CRM_Core_DAO_Domain',
168 'pseudoconstant' => [
169 'table' => 'civicrm_domain',
171 'labelColumn' => 'name',
177 'type' => CRM_Utils_Type
::T_STRING
,
178 'title' => ts('Dashlet Name'),
179 'description' => ts('Internal name of dashlet.'),
181 'size' => CRM_Utils_Type
::BIG
,
182 'where' => 'civicrm_dashboard.name',
183 'table_name' => 'civicrm_dashboard',
184 'entity' => 'Dashboard',
185 'bao' => 'CRM_Core_BAO_Dashboard',
191 'type' => CRM_Utils_Type
::T_STRING
,
192 'title' => ts('Dashlet Title'),
193 'description' => ts('dashlet title'),
195 'size' => CRM_Utils_Type
::HUGE
,
196 'where' => 'civicrm_dashboard.label',
197 'table_name' => 'civicrm_dashboard',
198 'entity' => 'Dashboard',
199 'bao' => 'CRM_Core_BAO_Dashboard',
205 'type' => CRM_Utils_Type
::T_STRING
,
206 'title' => ts('Dashlet URL'),
207 'description' => ts('url in case of external dashlet'),
209 'size' => CRM_Utils_Type
::HUGE
,
210 'where' => 'civicrm_dashboard.url',
211 'table_name' => 'civicrm_dashboard',
212 'entity' => 'Dashboard',
213 'bao' => 'CRM_Core_BAO_Dashboard',
218 'name' => 'permission',
219 'type' => CRM_Utils_Type
::T_STRING
,
220 'title' => ts('Dashlet Permission'),
221 'description' => ts('Permission for the dashlet'),
223 'size' => CRM_Utils_Type
::HUGE
,
224 'where' => 'civicrm_dashboard.permission',
225 'table_name' => 'civicrm_dashboard',
226 'entity' => 'Dashboard',
227 'bao' => 'CRM_Core_BAO_Dashboard',
229 'serialize' => self
::SERIALIZE_COMMA
,
232 'permission_operator' => [
233 'name' => 'permission_operator',
234 'type' => CRM_Utils_Type
::T_STRING
,
235 'title' => ts('Dashlet Permission Operator'),
236 'description' => ts('Permission Operator'),
238 'size' => CRM_Utils_Type
::FOUR
,
239 'where' => 'civicrm_dashboard.permission_operator',
240 'table_name' => 'civicrm_dashboard',
241 'entity' => 'Dashboard',
242 'bao' => 'CRM_Core_BAO_Dashboard',
246 'fullscreen_url' => [
247 'name' => 'fullscreen_url',
248 'type' => CRM_Utils_Type
::T_STRING
,
249 'title' => ts('Fullscreen URL'),
250 'description' => ts('fullscreen url for dashlet'),
252 'size' => CRM_Utils_Type
::HUGE
,
253 'where' => 'civicrm_dashboard.fullscreen_url',
254 'table_name' => 'civicrm_dashboard',
255 'entity' => 'Dashboard',
256 'bao' => 'CRM_Core_BAO_Dashboard',
261 'name' => 'is_active',
262 'type' => CRM_Utils_Type
::T_BOOLEAN
,
263 'title' => ts('Is Dashlet Active?'),
264 'description' => ts('Is this dashlet active?'),
265 'where' => 'civicrm_dashboard.is_active',
267 'table_name' => 'civicrm_dashboard',
268 'entity' => 'Dashboard',
269 'bao' => 'CRM_Core_BAO_Dashboard',
274 'name' => 'is_reserved',
275 'type' => CRM_Utils_Type
::T_BOOLEAN
,
276 'title' => ts('Is Dashlet Reserved?'),
277 'description' => ts('Is this dashlet reserved?'),
278 'where' => 'civicrm_dashboard.is_reserved',
280 'table_name' => 'civicrm_dashboard',
281 'entity' => 'Dashboard',
282 'bao' => 'CRM_Core_BAO_Dashboard',
287 'name' => 'cache_minutes',
288 'type' => CRM_Utils_Type
::T_INT
,
289 'title' => ts('Cache Minutes'),
290 'description' => ts('Number of minutes to cache dashlet content in browser localStorage.'),
292 'where' => 'civicrm_dashboard.cache_minutes',
294 'table_name' => 'civicrm_dashboard',
295 'entity' => 'Dashboard',
296 'bao' => 'CRM_Core_BAO_Dashboard',
301 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
303 return Civi
::$statics[__CLASS__
]['fields'];
307 * Return a mapping from field-name to the corresponding key (as used in fields()).
310 * Array(string $name => string $uniqueName).
312 public static function &fieldKeys() {
313 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
314 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
316 return Civi
::$statics[__CLASS__
]['fieldKeys'];
320 * Returns the names of this table
324 public static function getTableName() {
325 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
329 * Returns if this table needs to be logged
333 public function getLog() {
338 * Returns the list of fields that can be imported
340 * @param bool $prefix
344 public static function &import($prefix = FALSE) {
345 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'dashboard', $prefix, []);
350 * Returns the list of fields that can be exported
352 * @param bool $prefix
356 public static function &export($prefix = FALSE) {
357 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'dashboard', $prefix, []);
362 * Returns the list of indices
364 * @param bool $localize
368 public static function indices($localize = TRUE) {
370 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;