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/MailSettings.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:86515d7cb55425fbad3a71d5aa000af0)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
38 * CRM_Core_DAO_MailSettings constructor.
40 class CRM_Core_DAO_MailSettings
extends CRM_Core_DAO
{
42 * Static instance to hold the table name.
46 static $_tableName = 'civicrm_mail_settings';
48 * Should CiviCRM log any modifications to this table in the civicrm_log table.
60 * Which Domain is this match entry for
66 * name of this group of settings
72 * whether this is the default set of settings for this domain
78 * email address domain (the part after @)
84 * optional local part (like civimail+ for addresses like civimail+s.1.2@example.com)
90 * contents of the Return-Path header
96 * name of the protocol to use for polling (like IMAP, POP3 or Maildir)
102 * server to use when polling
108 * port to use when polling
114 * username to use when polling
120 * password to use when polling
126 * whether to use SSL or not
132 * folder to poll from when using IMAP, path to poll from when using Maildir, etc.
138 * Name of status to use when creating email to activity.
142 public $activity_status;
146 function __construct() {
147 $this->__table
= 'civicrm_mail_settings';
148 parent
::__construct();
151 * Returns foreign keys and entity references.
154 * [CRM_Core_Reference_Interface]
156 static function getReferenceColumns() {
157 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
158 Civi
::$statics[__CLASS__
]['links'] = static ::createReferenceColumns(__CLASS__
);
159 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName() , 'domain_id', 'civicrm_domain', 'id');
160 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
162 return Civi
::$statics[__CLASS__
]['links'];
165 * Returns all the column names of this table
169 static function &fields() {
170 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
171 Civi
::$statics[__CLASS__
]['fields'] = array(
174 'type' => CRM_Utils_Type
::T_INT
,
175 'title' => ts('Mail Settings ID') ,
176 'description' => 'primary key',
178 'table_name' => 'civicrm_mail_settings',
179 'entity' => 'MailSettings',
180 'bao' => 'CRM_Core_BAO_MailSettings',
183 'domain_id' => array(
184 'name' => 'domain_id',
185 'type' => CRM_Utils_Type
::T_INT
,
186 'title' => ts('Mail Settings Domain') ,
187 'description' => 'Which Domain is this match entry for',
189 'table_name' => 'civicrm_mail_settings',
190 'entity' => 'MailSettings',
191 'bao' => 'CRM_Core_BAO_MailSettings',
193 'FKClassName' => 'CRM_Core_DAO_Domain',
194 'pseudoconstant' => array(
195 'table' => 'civicrm_domain',
197 'labelColumn' => 'name',
202 'type' => CRM_Utils_Type
::T_STRING
,
203 'title' => ts('Mail Settings Name') ,
204 'description' => 'name of this group of settings',
206 'size' => CRM_Utils_Type
::HUGE
,
207 'table_name' => 'civicrm_mail_settings',
208 'entity' => 'MailSettings',
209 'bao' => 'CRM_Core_BAO_MailSettings',
212 'is_default' => array(
213 'name' => 'is_default',
214 'type' => CRM_Utils_Type
::T_BOOLEAN
,
215 'title' => ts('Is Default Mail Settings?') ,
216 'description' => 'whether this is the default set of settings for this domain',
217 'table_name' => 'civicrm_mail_settings',
218 'entity' => 'MailSettings',
219 'bao' => 'CRM_Core_BAO_MailSettings',
224 'type' => CRM_Utils_Type
::T_STRING
,
225 'title' => ts('email Domain') ,
226 'description' => 'email address domain (the part after @)',
228 'size' => CRM_Utils_Type
::HUGE
,
229 'table_name' => 'civicrm_mail_settings',
230 'entity' => 'MailSettings',
231 'bao' => 'CRM_Core_BAO_MailSettings',
234 'localpart' => array(
235 'name' => 'localpart',
236 'type' => CRM_Utils_Type
::T_STRING
,
237 'title' => ts('email Local Part') ,
238 'description' => 'optional local part (like civimail+ for addresses like civimail+s.1.2@example.com)',
240 'size' => CRM_Utils_Type
::HUGE
,
241 'table_name' => 'civicrm_mail_settings',
242 'entity' => 'MailSettings',
243 'bao' => 'CRM_Core_BAO_MailSettings',
246 'return_path' => array(
247 'name' => 'return_path',
248 'type' => CRM_Utils_Type
::T_STRING
,
249 'title' => ts('Return Path') ,
250 'description' => 'contents of the Return-Path header',
252 'size' => CRM_Utils_Type
::HUGE
,
253 'table_name' => 'civicrm_mail_settings',
254 'entity' => 'MailSettings',
255 'bao' => 'CRM_Core_BAO_MailSettings',
259 'name' => 'protocol',
260 'type' => CRM_Utils_Type
::T_STRING
,
261 'title' => ts('Protocol') ,
262 'description' => 'name of the protocol to use for polling (like IMAP, POP3 or Maildir)',
264 'size' => CRM_Utils_Type
::HUGE
,
265 'table_name' => 'civicrm_mail_settings',
266 'entity' => 'MailSettings',
267 'bao' => 'CRM_Core_BAO_MailSettings',
272 'pseudoconstant' => array(
273 'optionGroupName' => 'mail_protocol',
274 'optionEditPath' => 'civicrm/admin/options/mail_protocol',
279 'type' => CRM_Utils_Type
::T_STRING
,
280 'title' => ts('Mail Server') ,
281 'description' => 'server to use when polling',
283 'size' => CRM_Utils_Type
::HUGE
,
284 'table_name' => 'civicrm_mail_settings',
285 'entity' => 'MailSettings',
286 'bao' => 'CRM_Core_BAO_MailSettings',
291 'type' => CRM_Utils_Type
::T_INT
,
292 'title' => ts('Mail Port') ,
293 'description' => 'port to use when polling',
294 'table_name' => 'civicrm_mail_settings',
295 'entity' => 'MailSettings',
296 'bao' => 'CRM_Core_BAO_MailSettings',
300 'name' => 'username',
301 'type' => CRM_Utils_Type
::T_STRING
,
302 'title' => ts('Mail Account Username') ,
303 'description' => 'username to use when polling',
305 'size' => CRM_Utils_Type
::HUGE
,
306 'table_name' => 'civicrm_mail_settings',
307 'entity' => 'MailSettings',
308 'bao' => 'CRM_Core_BAO_MailSettings',
312 'name' => 'password',
313 'type' => CRM_Utils_Type
::T_STRING
,
314 'title' => ts('Mail Account Password') ,
315 'description' => 'password to use when polling',
317 'size' => CRM_Utils_Type
::HUGE
,
318 'table_name' => 'civicrm_mail_settings',
319 'entity' => 'MailSettings',
320 'bao' => 'CRM_Core_BAO_MailSettings',
325 'type' => CRM_Utils_Type
::T_BOOLEAN
,
326 'title' => ts('Mail Account Uses SSL') ,
327 'description' => 'whether to use SSL or not',
328 'table_name' => 'civicrm_mail_settings',
329 'entity' => 'MailSettings',
330 'bao' => 'CRM_Core_BAO_MailSettings',
335 'type' => CRM_Utils_Type
::T_STRING
,
336 'title' => ts('Mail Folder') ,
337 'description' => 'folder to poll from when using IMAP, path to poll from when using Maildir, etc.',
339 'size' => CRM_Utils_Type
::HUGE
,
340 'table_name' => 'civicrm_mail_settings',
341 'entity' => 'MailSettings',
342 'bao' => 'CRM_Core_BAO_MailSettings',
345 'activity_status' => array(
346 'name' => 'activity_status',
347 'type' => CRM_Utils_Type
::T_STRING
,
348 'title' => ts('Activity Status') ,
349 'description' => 'Name of status to use when creating email to activity.',
351 'size' => CRM_Utils_Type
::HUGE
,
352 'table_name' => 'civicrm_mail_settings',
353 'entity' => 'MailSettings',
354 'bao' => 'CRM_Core_BAO_MailSettings',
359 'pseudoconstant' => array(
360 'optionGroupName' => 'activity_status',
361 'keyColumn' => 'name',
362 'optionEditPath' => 'civicrm/admin/options/activity_status',
366 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
368 return Civi
::$statics[__CLASS__
]['fields'];
371 * Return a mapping from field-name to the corresponding key (as used in fields()).
374 * Array(string $name => string $uniqueName).
376 static function &fieldKeys() {
377 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
378 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
380 return Civi
::$statics[__CLASS__
]['fieldKeys'];
383 * Returns the names of this table
387 static function getTableName() {
388 return self
::$_tableName;
391 * Returns if this table needs to be logged
399 * Returns the list of fields that can be imported
401 * @param bool $prefix
405 static function &import($prefix = false) {
406 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'mail_settings', $prefix, array());
410 * Returns the list of fields that can be exported
412 * @param bool $prefix
416 static function &export($prefix = false) {
417 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'mail_settings', $prefix, array());
421 * Returns the list of indices
423 public static function indices($localize = TRUE) {
425 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;