5 * @copyright CiviCRM LLC (c) 2004-2018
7 * Generated from xml/schema/CRM/Core/Dashboard.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
9 * (GenCodeChecksum:6b7454609bac684a5d32597cdd433f3d)
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 static $_tableName = 'civicrm_dashboard';
25 * Should CiviCRM log any modifications to this table in the civicrm_log table.
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 foreign keys and entity references.
118 * [CRM_Core_Reference_Interface]
120 public static function getReferenceColumns() {
121 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
122 Civi
::$statics[__CLASS__
]['links'] = static ::createReferenceColumns(__CLASS__
);
123 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'domain_id', 'civicrm_domain', 'id');
124 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
126 return Civi
::$statics[__CLASS__
]['links'];
130 * Returns all the column names of this table
134 public static function &fields() {
135 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
136 Civi
::$statics[__CLASS__
]['fields'] = [
139 'type' => CRM_Utils_Type
::T_INT
,
140 'title' => ts('DashletID'),
142 'table_name' => 'civicrm_dashboard',
143 'entity' => 'Dashboard',
144 'bao' => 'CRM_Core_BAO_Dashboard',
148 'name' => 'domain_id',
149 'type' => CRM_Utils_Type
::T_INT
,
150 'title' => ts('Dashlet Domain'),
151 'description' => 'Domain for dashboard',
153 'table_name' => 'civicrm_dashboard',
154 'entity' => 'Dashboard',
155 'bao' => 'CRM_Core_BAO_Dashboard',
157 'FKClassName' => 'CRM_Core_DAO_Domain',
158 'pseudoconstant' => [
159 'table' => 'civicrm_domain',
161 'labelColumn' => 'name',
166 'type' => CRM_Utils_Type
::T_STRING
,
167 'title' => ts('Dashlet Name'),
168 'description' => 'Internal name of dashlet.',
170 'size' => CRM_Utils_Type
::BIG
,
171 'table_name' => 'civicrm_dashboard',
172 'entity' => 'Dashboard',
173 'bao' => 'CRM_Core_BAO_Dashboard',
178 'type' => CRM_Utils_Type
::T_STRING
,
179 'title' => ts('Dashlet Title'),
180 'description' => 'dashlet title',
182 'size' => CRM_Utils_Type
::HUGE
,
183 'table_name' => 'civicrm_dashboard',
184 'entity' => 'Dashboard',
185 'bao' => 'CRM_Core_BAO_Dashboard',
190 'type' => CRM_Utils_Type
::T_STRING
,
191 'title' => ts('Dashlet URL'),
192 'description' => 'url in case of external dashlet',
194 'size' => CRM_Utils_Type
::HUGE
,
195 'table_name' => 'civicrm_dashboard',
196 'entity' => 'Dashboard',
197 'bao' => 'CRM_Core_BAO_Dashboard',
201 'name' => 'permission',
202 'type' => CRM_Utils_Type
::T_STRING
,
203 'title' => ts('Dashlet Permission'),
204 'description' => 'Permission for the dashlet',
206 'size' => CRM_Utils_Type
::HUGE
,
207 'table_name' => 'civicrm_dashboard',
208 'entity' => 'Dashboard',
209 'bao' => 'CRM_Core_BAO_Dashboard',
212 'permission_operator' => [
213 'name' => 'permission_operator',
214 'type' => CRM_Utils_Type
::T_STRING
,
215 'title' => ts('Dashlet Permission Operator'),
216 'description' => 'Permission Operator',
218 'size' => CRM_Utils_Type
::FOUR
,
219 'table_name' => 'civicrm_dashboard',
220 'entity' => 'Dashboard',
221 'bao' => 'CRM_Core_BAO_Dashboard',
224 'fullscreen_url' => [
225 'name' => 'fullscreen_url',
226 'type' => CRM_Utils_Type
::T_STRING
,
227 'title' => ts('Fullscreen URL'),
228 'description' => 'fullscreen url for dashlet',
230 'size' => CRM_Utils_Type
::HUGE
,
231 'table_name' => 'civicrm_dashboard',
232 'entity' => 'Dashboard',
233 'bao' => 'CRM_Core_BAO_Dashboard',
237 'name' => 'is_active',
238 'type' => CRM_Utils_Type
::T_BOOLEAN
,
239 'title' => ts('Is Dashlet Active?'),
240 'description' => 'Is this dashlet active?',
241 'table_name' => 'civicrm_dashboard',
242 'entity' => 'Dashboard',
243 'bao' => 'CRM_Core_BAO_Dashboard',
247 'name' => 'is_reserved',
248 'type' => CRM_Utils_Type
::T_BOOLEAN
,
249 'title' => ts('Is Dashlet Reserved?'),
250 'description' => 'Is this dashlet reserved?',
251 'table_name' => 'civicrm_dashboard',
252 'entity' => 'Dashboard',
253 'bao' => 'CRM_Core_BAO_Dashboard',
257 'name' => 'cache_minutes',
258 'type' => CRM_Utils_Type
::T_INT
,
259 'title' => ts('Cache Minutes'),
260 'description' => 'Number of minutes to cache dashlet content in browser localStorage.',
263 'table_name' => 'civicrm_dashboard',
264 'entity' => 'Dashboard',
265 'bao' => 'CRM_Core_BAO_Dashboard',
269 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
271 return Civi
::$statics[__CLASS__
]['fields'];
275 * Return a mapping from field-name to the corresponding key (as used in fields()).
278 * Array(string $name => string $uniqueName).
280 public static function &fieldKeys() {
281 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
282 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
284 return Civi
::$statics[__CLASS__
]['fieldKeys'];
288 * Returns the names of this table
292 public static function getTableName() {
293 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
297 * Returns if this table needs to be logged
301 public function getLog() {
306 * Returns the list of fields that can be imported
308 * @param bool $prefix
312 public static function &import($prefix = FALSE) {
313 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'dashboard', $prefix, []);
318 * Returns the list of fields that can be exported
320 * @param bool $prefix
324 public static function &export($prefix = FALSE) {
325 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'dashboard', $prefix, []);
330 * Returns the list of indices
332 * @param bool $localize
336 public static function indices($localize = TRUE) {
338 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;