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/Domain.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:50edefeb24aa64d2125df018985cd701)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
38 * CRM_Core_DAO_Domain constructor.
40 class CRM_Core_DAO_Domain
extends CRM_Core_DAO
{
42 * Static instance to hold the table name.
46 static $_tableName = 'civicrm_domain';
48 * Should CiviCRM log any modifications to this table in the civicrm_log table.
60 * Name of Domain / Organization
66 * Description of Domain.
72 * Backend configuration.
76 public $config_backend;
78 * The civicrm version this instance is running
84 * FK to Contact ID. This is specifically not an FK to avoid circular constraints
90 * list of locales supported by the current db state (NULL for single-lang install)
96 * Locale specific string overrides
100 public $locale_custom_strings;
104 function __construct() {
105 $this->__table
= 'civicrm_domain';
106 parent
::__construct();
109 * Returns foreign keys and entity references.
112 * [CRM_Core_Reference_Interface]
114 static function getReferenceColumns() {
115 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
116 Civi
::$statics[__CLASS__
]['links'] = static ::createReferenceColumns(__CLASS__
);
117 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName() , 'contact_id', 'civicrm_contact', 'id');
118 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
120 return Civi
::$statics[__CLASS__
]['links'];
123 * Returns all the column names of this table
127 static function &fields() {
128 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
129 Civi
::$statics[__CLASS__
]['fields'] = array(
132 'type' => CRM_Utils_Type
::T_INT
,
133 'title' => ts('Domain ID') ,
134 'description' => 'Domain ID',
136 'table_name' => 'civicrm_domain',
137 'entity' => 'Domain',
138 'bao' => 'CRM_Core_BAO_Domain',
143 'type' => CRM_Utils_Type
::T_STRING
,
144 'title' => ts('Domain Name') ,
145 'description' => 'Name of Domain / Organization',
147 'size' => CRM_Utils_Type
::BIG
,
148 'table_name' => 'civicrm_domain',
149 'entity' => 'Domain',
150 'bao' => 'CRM_Core_BAO_Domain',
156 'description' => array(
157 'name' => 'description',
158 'type' => CRM_Utils_Type
::T_STRING
,
159 'title' => ts('Domain Description') ,
160 'description' => 'Description of Domain.',
162 'size' => CRM_Utils_Type
::HUGE
,
163 'table_name' => 'civicrm_domain',
164 'entity' => 'Domain',
165 'bao' => 'CRM_Core_BAO_Domain',
171 'config_backend' => array(
172 'name' => 'config_backend',
173 'type' => CRM_Utils_Type
::T_TEXT
,
174 'title' => ts('Domain Configuration') ,
175 'description' => 'Backend configuration.',
178 'table_name' => 'civicrm_domain',
179 'entity' => 'Domain',
180 'bao' => 'CRM_Core_BAO_Domain',
183 'type' => 'TextArea',
188 'type' => CRM_Utils_Type
::T_STRING
,
189 'title' => ts('CiviCRM Version') ,
190 'description' => 'The civicrm version this instance is running',
192 'size' => CRM_Utils_Type
::MEDIUM
,
193 'table_name' => 'civicrm_domain',
194 'entity' => 'Domain',
195 'bao' => 'CRM_Core_BAO_Domain',
198 'contact_id' => array(
199 'name' => 'contact_id',
200 'type' => CRM_Utils_Type
::T_INT
,
201 'title' => ts('Domain Contact') ,
202 'description' => 'FK to Contact ID. This is specifically not an FK to avoid circular constraints',
203 'table_name' => 'civicrm_domain',
204 'entity' => 'Domain',
205 'bao' => 'CRM_Core_BAO_Domain',
207 'FKClassName' => 'CRM_Contact_DAO_Contact',
211 'type' => CRM_Utils_Type
::T_TEXT
,
212 'title' => ts('Supported Languages') ,
213 'description' => 'list of locales supported by the current db state (NULL for single-lang install)',
214 'table_name' => 'civicrm_domain',
215 'entity' => 'Domain',
216 'bao' => 'CRM_Core_BAO_Domain',
219 'locale_custom_strings' => array(
220 'name' => 'locale_custom_strings',
221 'type' => CRM_Utils_Type
::T_TEXT
,
222 'title' => ts('Language Customizations') ,
223 'description' => 'Locale specific string overrides',
226 'table_name' => 'civicrm_domain',
227 'entity' => 'Domain',
228 'bao' => 'CRM_Core_BAO_Domain',
231 'type' => 'TextArea',
235 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
237 return Civi
::$statics[__CLASS__
]['fields'];
240 * Return a mapping from field-name to the corresponding key (as used in fields()).
243 * Array(string $name => string $uniqueName).
245 static function &fieldKeys() {
246 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
247 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
249 return Civi
::$statics[__CLASS__
]['fieldKeys'];
252 * Returns the names of this table
256 static function getTableName() {
257 return self
::$_tableName;
260 * Returns if this table needs to be logged
268 * Returns the list of fields that can be imported
270 * @param bool $prefix
274 static function &import($prefix = false) {
275 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'domain', $prefix, array());
279 * Returns the list of fields that can be exported
281 * @param bool $prefix
285 static function &export($prefix = false) {
286 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'domain', $prefix, array());
290 * Returns the list of indices
292 public static function indices($localize = TRUE) {
299 'localizable' => false,
301 'sig' => 'civicrm_domain::1::name',
304 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;