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/StatusPreference.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:a4010608f5b37f8e703fd4ae4b63bb35)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
38 * CRM_Core_DAO_StatusPreference constructor.
40 class CRM_Core_DAO_StatusPreference
extends CRM_Core_DAO
{
42 * Static instance to hold the table name.
46 static $_tableName = 'civicrm_status_pref';
48 * Should CiviCRM log any modifications to this table in the civicrm_log table.
54 * Unique Status Preference ID
60 * Which Domain is this Status Preference for
66 * Name of the status check this preference references.
72 * expires ignore_severity. NULL never hushes.
78 * Hush messages up to and including this severity.
82 public $ignore_severity;
84 * These settings are per-check, and can't be compared across checks.
90 * These values are per-check, and can't be compared across checks.
98 function __construct() {
99 $this->__table
= 'civicrm_status_pref';
100 parent
::__construct();
103 * Returns foreign keys and entity references.
106 * [CRM_Core_Reference_Interface]
108 static function getReferenceColumns() {
109 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
110 Civi
::$statics[__CLASS__
]['links'] = static ::createReferenceColumns(__CLASS__
);
111 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName() , 'domain_id', 'civicrm_domain', 'id');
112 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
114 return Civi
::$statics[__CLASS__
]['links'];
117 * Returns all the column names of this table
121 static function &fields() {
122 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
123 Civi
::$statics[__CLASS__
]['fields'] = array(
126 'type' => CRM_Utils_Type
::T_INT
,
127 'title' => ts('Status Preference ID') ,
128 'description' => 'Unique Status Preference ID',
131 'domain_id' => array(
132 'name' => 'domain_id',
133 'type' => CRM_Utils_Type
::T_INT
,
134 'title' => ts('Setting Domain') ,
135 'description' => 'Which Domain is this Status Preference for',
137 'FKClassName' => 'CRM_Core_DAO_Domain',
138 'pseudoconstant' => array(
139 'table' => 'civicrm_domain',
141 'labelColumn' => 'name',
146 'type' => CRM_Utils_Type
::T_STRING
,
147 'title' => ts('Status Check Name') ,
148 'description' => 'Name of the status check this preference references.',
151 'size' => CRM_Utils_Type
::HUGE
,
153 'where' => 'civicrm_status_pref.name',
154 'headerPattern' => '',
158 'hush_until' => array(
159 'name' => 'hush_until',
160 'type' => CRM_Utils_Type
::T_DATE
,
161 'title' => ts('Snooze Status Notifications Until') ,
162 'description' => 'expires ignore_severity. NULL never hushes.',
164 'where' => 'civicrm_status_pref.hush_until',
165 'headerPattern' => '',
170 'ignore_severity' => array(
171 'name' => 'ignore_severity',
172 'type' => CRM_Utils_Type
::T_INT
,
173 'title' => ts('Ignore Severity') ,
174 'description' => 'Hush messages up to and including this severity.',
176 'where' => 'civicrm_status_pref.ignore_severity',
177 'headerPattern' => '',
181 'pseudoconstant' => array(
182 'callback' => 'CRM_Utils_Check::getSeverityList',
187 'type' => CRM_Utils_Type
::T_STRING
,
188 'title' => ts('Status Preferences') ,
189 'description' => 'These settings are per-check, and can\'t be compared across checks.',
191 'size' => CRM_Utils_Type
::HUGE
,
193 'check_info' => array(
194 'name' => 'check_info',
195 'type' => CRM_Utils_Type
::T_STRING
,
196 'title' => ts('Check Info') ,
197 'description' => 'These values are per-check, and can\'t be compared across checks.',
199 'size' => CRM_Utils_Type
::HUGE
,
202 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
204 return Civi
::$statics[__CLASS__
]['fields'];
207 * Return a mapping from field-name to the corresponding key (as used in fields()).
210 * Array(string $name => string $uniqueName).
212 static function &fieldKeys() {
213 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
214 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
216 return Civi
::$statics[__CLASS__
]['fieldKeys'];
219 * Returns the names of this table
223 static function getTableName() {
224 return self
::$_tableName;
227 * Returns if this table needs to be logged
235 * Returns the list of fields that can be imported
237 * @param bool $prefix
241 static function &import($prefix = false) {
242 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'status_pref', $prefix, array());
246 * Returns the list of fields that can be exported
248 * @param bool $prefix
252 static function &export($prefix = false) {
253 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'status_pref', $prefix, array());