3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.7 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2016 |
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-2016
31 * Generated from xml/schema/CRM/Core/Setting.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:cc5f4aca441eb6d874c637a53cabddd8)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
37 class CRM_Core_DAO_Setting
extends CRM_Core_DAO
{
39 * static instance to hold the table name
43 static $_tableName = 'civicrm_setting';
45 * static instance to hold the field values
49 static $_fields = null;
51 * static instance to hold the keys used in $_fields for each field.
55 static $_fieldKeys = null;
57 * static instance to hold the FK relationships
61 static $_links = null;
63 * static value to see if we should log any modifications to
64 * this table in the civicrm_log table
75 * Unique name for setting
81 * data associated with this group / name combo
87 * Which Domain is this menu item for
93 * FK to Contact ID if the setting is localized to a contact
99 * Is this setting a contact specific or site wide setting?
105 * Component that this menu item belongs to
109 public $component_id;
111 * When was the setting created
115 public $created_date;
117 * FK to civicrm_contact, who created this setting
125 * @return civicrm_setting
127 function __construct() {
128 $this->__table
= 'civicrm_setting';
129 parent
::__construct();
132 * Returns foreign keys and entity references
135 * [CRM_Core_Reference_Interface]
137 static function getReferenceColumns() {
138 if (!self
::$_links) {
139 self
::$_links = static ::createReferenceColumns(__CLASS__
);
140 self
::$_links[] = new CRM_Core_Reference_Basic(self
::getTableName() , 'domain_id', 'civicrm_domain', 'id');
141 self
::$_links[] = new CRM_Core_Reference_Basic(self
::getTableName() , 'contact_id', 'civicrm_contact', 'id');
142 self
::$_links[] = new CRM_Core_Reference_Basic(self
::getTableName() , 'component_id', 'civicrm_component', 'id');
143 self
::$_links[] = new CRM_Core_Reference_Basic(self
::getTableName() , 'created_id', 'civicrm_contact', 'id');
145 return self
::$_links;
148 * Returns all the column names of this table
152 static function &fields() {
153 if (!(self
::$_fields)) {
154 self
::$_fields = array(
157 'type' => CRM_Utils_Type
::T_INT
,
158 'title' => ts('Setting ID') ,
163 'type' => CRM_Utils_Type
::T_STRING
,
164 'title' => ts('Setting Name') ,
165 'description' => 'Unique name for setting',
167 'size' => CRM_Utils_Type
::HUGE
,
171 'type' => CRM_Utils_Type
::T_TEXT
,
172 'title' => ts('Value') ,
173 'description' => 'data associated with this group / name combo',
175 'domain_id' => array(
176 'name' => 'domain_id',
177 'type' => CRM_Utils_Type
::T_INT
,
178 'title' => ts('Setting Domain') ,
179 'description' => 'Which Domain is this menu item for',
181 'FKClassName' => 'CRM_Core_DAO_Domain',
182 'pseudoconstant' => array(
183 'table' => 'civicrm_domain',
185 'labelColumn' => 'name',
188 'contact_id' => array(
189 'name' => 'contact_id',
190 'type' => CRM_Utils_Type
::T_INT
,
191 'title' => ts('Setting Contact') ,
192 'description' => 'FK to Contact ID if the setting is localized to a contact',
193 'FKClassName' => 'CRM_Contact_DAO_Contact',
195 'is_domain' => array(
196 'name' => 'is_domain',
197 'type' => CRM_Utils_Type
::T_BOOLEAN
,
198 'title' => ts('Is Domain Setting?') ,
199 'description' => 'Is this setting a contact specific or site wide setting?',
201 'component_id' => array(
202 'name' => 'component_id',
203 'type' => CRM_Utils_Type
::T_INT
,
204 'title' => ts('Setting Component') ,
205 'description' => 'Component that this menu item belongs to',
206 'FKClassName' => 'CRM_Core_DAO_Component',
210 'pseudoconstant' => array(
211 'table' => 'civicrm_component',
213 'labelColumn' => 'name',
216 'created_date' => array(
217 'name' => 'created_date',
218 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
219 'title' => ts('Setting Created Date') ,
220 'description' => 'When was the setting created',
222 'created_id' => array(
223 'name' => 'created_id',
224 'type' => CRM_Utils_Type
::T_INT
,
225 'title' => ts('Setting Created By') ,
226 'description' => 'FK to civicrm_contact, who created this setting',
227 'FKClassName' => 'CRM_Contact_DAO_Contact',
231 return self
::$_fields;
234 * Returns an array containing, for each field, the arary key used for that
235 * field in self::$_fields.
239 static function &fieldKeys() {
240 if (!(self
::$_fieldKeys)) {
241 self
::$_fieldKeys = array(
245 'domain_id' => 'domain_id',
246 'contact_id' => 'contact_id',
247 'is_domain' => 'is_domain',
248 'component_id' => 'component_id',
249 'created_date' => 'created_date',
250 'created_id' => 'created_id',
253 return self
::$_fieldKeys;
256 * Returns the names of this table
260 static function getTableName() {
261 return self
::$_tableName;
264 * Returns if this table needs to be logged
272 * Returns the list of fields that can be imported
274 * @param bool $prefix
278 static function &import($prefix = false) {
279 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'setting', $prefix, array());
283 * Returns the list of fields that can be exported
285 * @param bool $prefix
289 static function &export($prefix = false) {
290 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'setting', $prefix, array());