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/Mailing/Component.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:33742feaa53eaba2c4a543c4e5c673ab)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
38 * CRM_Mailing_DAO_Component constructor.
40 class CRM_Mailing_DAO_Component
extends CRM_Core_DAO
{
42 * Static instance to hold the table name.
46 static $_tableName = 'civicrm_mailing_component';
48 * Should CiviCRM log any modifications to this table in the civicrm_log table.
59 * The name of this component
69 public $component_type;
76 * Body of the component in html format.
82 * Body of the component in text format.
88 * Is this the default component for this component_type?
94 * Is this property active?
102 function __construct() {
103 $this->__table
= 'civicrm_mailing_component';
104 parent
::__construct();
107 * Returns all the column names of this table
111 static function &fields() {
112 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
113 Civi
::$statics[__CLASS__
]['fields'] = array(
116 'type' => CRM_Utils_Type
::T_INT
,
117 'title' => ts('Mailing Component ID') ,
119 'table_name' => 'civicrm_mailing_component',
120 'entity' => 'Component',
121 'bao' => 'CRM_Mailing_BAO_Component',
125 'type' => CRM_Utils_Type
::T_STRING
,
126 'title' => ts('Component Name') ,
127 'description' => 'The name of this component',
129 'size' => CRM_Utils_Type
::BIG
,
130 'table_name' => 'civicrm_mailing_component',
131 'entity' => 'Component',
132 'bao' => 'CRM_Mailing_BAO_Component',
134 'component_type' => array(
135 'name' => 'component_type',
136 'type' => CRM_Utils_Type
::T_STRING
,
137 'title' => ts('Mailing Component Type') ,
138 'description' => 'Type of Component.',
140 'size' => CRM_Utils_Type
::TWELVE
,
141 'table_name' => 'civicrm_mailing_component',
142 'entity' => 'Component',
143 'bao' => 'CRM_Mailing_BAO_Component',
147 'pseudoconstant' => array(
148 'callback' => 'CRM_Core_SelectValues::mailingComponents',
153 'type' => CRM_Utils_Type
::T_STRING
,
154 'title' => ts('Subject') ,
156 'size' => CRM_Utils_Type
::HUGE
,
157 'table_name' => 'civicrm_mailing_component',
158 'entity' => 'Component',
159 'bao' => 'CRM_Mailing_BAO_Component',
161 'body_html' => array(
162 'name' => 'body_html',
163 'type' => CRM_Utils_Type
::T_TEXT
,
164 'title' => ts('Mailing Component Body HTML') ,
165 'description' => 'Body of the component in html format.',
168 'table_name' => 'civicrm_mailing_component',
169 'entity' => 'Component',
170 'bao' => 'CRM_Mailing_BAO_Component',
172 'type' => 'TextArea',
175 'body_text' => array(
176 'name' => 'body_text',
177 'type' => CRM_Utils_Type
::T_TEXT
,
178 'title' => ts('Body Text') ,
179 'description' => 'Body of the component in text format.',
182 'table_name' => 'civicrm_mailing_component',
183 'entity' => 'Component',
184 'bao' => 'CRM_Mailing_BAO_Component',
186 'type' => 'TextArea',
189 'is_default' => array(
190 'name' => 'is_default',
191 'type' => CRM_Utils_Type
::T_BOOLEAN
,
192 'title' => ts('Mailing Component is Default?') ,
193 'description' => 'Is this the default component for this component_type?',
194 'table_name' => 'civicrm_mailing_component',
195 'entity' => 'Component',
196 'bao' => 'CRM_Mailing_BAO_Component',
198 'is_active' => array(
199 'name' => 'is_active',
200 'type' => CRM_Utils_Type
::T_BOOLEAN
,
201 'title' => ts('Mailing Component Is Active?') ,
202 'description' => 'Is this property active?',
203 'table_name' => 'civicrm_mailing_component',
204 'entity' => 'Component',
205 'bao' => 'CRM_Mailing_BAO_Component',
208 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
210 return Civi
::$statics[__CLASS__
]['fields'];
213 * Return a mapping from field-name to the corresponding key (as used in fields()).
216 * Array(string $name => string $uniqueName).
218 static function &fieldKeys() {
219 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
220 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
222 return Civi
::$statics[__CLASS__
]['fieldKeys'];
225 * Returns the names of this table
229 static function getTableName() {
230 return self
::$_tableName;
233 * Returns if this table needs to be logged
241 * Returns the list of fields that can be imported
243 * @param bool $prefix
247 static function &import($prefix = false) {
248 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'mailing_component', $prefix, array());
252 * Returns the list of fields that can be exported
254 * @param bool $prefix
258 static function &export($prefix = false) {
259 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'mailing_component', $prefix, array());