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/MessageTemplate.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:3fbfb8f01af4d15128b6e3982d9337d9)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
37 class CRM_Core_DAO_MessageTemplate
extends CRM_Core_DAO
{
39 * static instance to hold the table name
43 static $_tableName = 'civicrm_msg_template';
45 * static value to see if we should log any modifications to
46 * this table in the civicrm_log table
58 * Descriptive title of message
64 * Subject for email message.
70 * Text formatted message
76 * HTML formatted message
87 * a pseudo-FK to civicrm_option_value
93 * is this the default message template for the workflow referenced by workflow_id?
99 * is this the reserved message template which we ship for the workflow referenced by workflow_id?
105 * Is this message template used for sms?
111 * a pseudo-FK to civicrm_option_value containing PDF Page Format.
115 public $pdf_format_id;
119 * @return civicrm_msg_template
121 function __construct() {
122 $this->__table
= 'civicrm_msg_template';
123 parent
::__construct();
126 * Returns all the column names of this table
130 static function &fields() {
131 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
132 Civi
::$statics[__CLASS__
]['fields'] = array(
135 'type' => CRM_Utils_Type
::T_INT
,
136 'title' => ts('Message Template ID') ,
137 'description' => 'Message Template ID',
140 'msg_title' => array(
141 'name' => 'msg_title',
142 'type' => CRM_Utils_Type
::T_STRING
,
143 'title' => ts('Message Template Title') ,
144 'description' => 'Descriptive title of message',
146 'size' => CRM_Utils_Type
::HUGE
,
148 'msg_subject' => array(
149 'name' => 'msg_subject',
150 'type' => CRM_Utils_Type
::T_TEXT
,
151 'title' => ts('Message Template Subject') ,
152 'description' => 'Subject for email message.',
155 'name' => 'msg_text',
156 'type' => CRM_Utils_Type
::T_LONGTEXT
,
157 'title' => ts('Message Template Text') ,
158 'description' => 'Text formatted message',
160 'type' => 'TextArea',
164 'name' => 'msg_html',
165 'type' => CRM_Utils_Type
::T_LONGTEXT
,
166 'title' => ts('Message Template HTML') ,
167 'description' => 'HTML formatted message',
169 'type' => 'RichTextEditor',
172 'is_active' => array(
173 'name' => 'is_active',
174 'type' => CRM_Utils_Type
::T_BOOLEAN
,
175 'title' => ts('Is Active') ,
178 'workflow_id' => array(
179 'name' => 'workflow_id',
180 'type' => CRM_Utils_Type
::T_INT
,
181 'title' => ts('Message Template Workflow') ,
182 'description' => 'a pseudo-FK to civicrm_option_value',
184 'is_default' => array(
185 'name' => 'is_default',
186 'type' => CRM_Utils_Type
::T_BOOLEAN
,
187 'title' => ts('Message Template Is Default?') ,
188 'description' => 'is this the default message template for the workflow referenced by workflow_id?',
191 'is_reserved' => array(
192 'name' => 'is_reserved',
193 'type' => CRM_Utils_Type
::T_BOOLEAN
,
194 'title' => ts('Message Template Is Reserved?') ,
195 'description' => 'is this the reserved message template which we ship for the workflow referenced by workflow_id?',
199 'type' => CRM_Utils_Type
::T_BOOLEAN
,
200 'title' => ts('Message Template is used for SMS?') ,
201 'description' => 'Is this message template used for sms?',
203 'pdf_format_id' => array(
204 'name' => 'pdf_format_id',
205 'type' => CRM_Utils_Type
::T_INT
,
206 'title' => ts('Message Template Format') ,
207 'description' => 'a pseudo-FK to civicrm_option_value containing PDF Page Format.',
208 'pseudoconstant' => array(
209 'optionGroupName' => 'pdf_format',
211 'optionEditPath' => 'civicrm/admin/options/pdf_format',
215 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
217 return Civi
::$statics[__CLASS__
]['fields'];
220 * Return a mapping from field-name to the corresponding key (as used in fields()).
223 * Array(string $name => string $uniqueName).
225 static function &fieldKeys() {
226 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
227 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
229 return Civi
::$statics[__CLASS__
]['fieldKeys'];
232 * Returns the names of this table
236 static function getTableName() {
237 return self
::$_tableName;
240 * Returns if this table needs to be logged
248 * Returns the list of fields that can be imported
250 * @param bool $prefix
254 static function &import($prefix = false) {
255 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'msg_template', $prefix, array());
259 * Returns the list of fields that can be exported
261 * @param bool $prefix
265 static function &export($prefix = false) {
266 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'msg_template', $prefix, array());