Merge pull request #11352 from JMAConsulting/CRM-21499
[civicrm-core.git] / CRM / Core / DAO / ActionMapping.php
1 <?php
2 /*
3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.7 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2017 |
7 +--------------------------------------------------------------------+
8 | This file is a part of CiviCRM. |
9 | |
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. |
13 | |
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. |
18 | |
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 +--------------------------------------------------------------------+
26 */
27 /**
28 * @package CRM
29 * @copyright CiviCRM LLC (c) 2004-2017
30 *
31 * Generated from xml/schema/CRM/Core/ActionMapping.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:3ae720be63fdf4626db2d1508c2d8f44)
34 */
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
37 /**
38 * CRM_Core_DAO_ActionMapping constructor.
39 */
40 class CRM_Core_DAO_ActionMapping extends CRM_Core_DAO {
41 /**
42 * Static instance to hold the table name.
43 *
44 * @var string
45 */
46 static $_tableName = 'civicrm_action_mapping';
47 /**
48 * Should CiviCRM log any modifications to this table in the civicrm_log table.
49 *
50 * @var boolean
51 */
52 static $_log = false;
53 /**
54 *
55 * @var int unsigned
56 */
57 public $id;
58 /**
59 * Entity for which the reminder is created
60 *
61 * @var string
62 */
63 public $entity;
64 /**
65 * Entity value
66 *
67 * @var string
68 */
69 public $entity_value;
70 /**
71 * Entity value label
72 *
73 * @var string
74 */
75 public $entity_value_label;
76 /**
77 * Entity status
78 *
79 * @var string
80 */
81 public $entity_status;
82 /**
83 * Entity status label
84 *
85 * @var string
86 */
87 public $entity_status_label;
88 /**
89 * Entity date
90 *
91 * @var string
92 */
93 public $entity_date_start;
94 /**
95 * Entity date
96 *
97 * @var string
98 */
99 public $entity_date_end;
100 /**
101 * Entity recipient
102 *
103 * @var string
104 */
105 public $entity_recipient;
106 /**
107 * Class constructor.
108 */
109 function __construct() {
110 $this->__table = 'civicrm_action_mapping';
111 parent::__construct();
112 }
113 /**
114 * Returns all the column names of this table
115 *
116 * @return array
117 */
118 static function &fields() {
119 if (!isset(Civi::$statics[__CLASS__]['fields'])) {
120 Civi::$statics[__CLASS__]['fields'] = array(
121 'id' => array(
122 'name' => 'id',
123 'type' => CRM_Utils_Type::T_INT,
124 'title' => ts('Action Mapping ID') ,
125 'required' => true,
126 'table_name' => 'civicrm_action_mapping',
127 'entity' => 'ActionMapping',
128 'bao' => 'CRM_Core_DAO_ActionMapping',
129 'localizable' => 0,
130 ) ,
131 'entity' => array(
132 'name' => 'entity',
133 'type' => CRM_Utils_Type::T_STRING,
134 'title' => ts('Action Mapping Entity') ,
135 'description' => 'Entity for which the reminder is created',
136 'maxlength' => 64,
137 'size' => CRM_Utils_Type::BIG,
138 'table_name' => 'civicrm_action_mapping',
139 'entity' => 'ActionMapping',
140 'bao' => 'CRM_Core_DAO_ActionMapping',
141 'localizable' => 0,
142 ) ,
143 'entity_value' => array(
144 'name' => 'entity_value',
145 'type' => CRM_Utils_Type::T_STRING,
146 'title' => ts('Action Mapping Entity Value') ,
147 'description' => 'Entity value',
148 'maxlength' => 64,
149 'size' => CRM_Utils_Type::BIG,
150 'table_name' => 'civicrm_action_mapping',
151 'entity' => 'ActionMapping',
152 'bao' => 'CRM_Core_DAO_ActionMapping',
153 'localizable' => 0,
154 ) ,
155 'entity_value_label' => array(
156 'name' => 'entity_value_label',
157 'type' => CRM_Utils_Type::T_STRING,
158 'title' => ts('Value Label') ,
159 'description' => 'Entity value label',
160 'maxlength' => 64,
161 'size' => CRM_Utils_Type::BIG,
162 'table_name' => 'civicrm_action_mapping',
163 'entity' => 'ActionMapping',
164 'bao' => 'CRM_Core_DAO_ActionMapping',
165 'localizable' => 0,
166 ) ,
167 'entity_status' => array(
168 'name' => 'entity_status',
169 'type' => CRM_Utils_Type::T_STRING,
170 'title' => ts('Status') ,
171 'description' => 'Entity status',
172 'maxlength' => 64,
173 'size' => CRM_Utils_Type::BIG,
174 'table_name' => 'civicrm_action_mapping',
175 'entity' => 'ActionMapping',
176 'bao' => 'CRM_Core_DAO_ActionMapping',
177 'localizable' => 0,
178 ) ,
179 'entity_status_label' => array(
180 'name' => 'entity_status_label',
181 'type' => CRM_Utils_Type::T_STRING,
182 'title' => ts('Status Label') ,
183 'description' => 'Entity status label',
184 'maxlength' => 64,
185 'size' => CRM_Utils_Type::BIG,
186 'table_name' => 'civicrm_action_mapping',
187 'entity' => 'ActionMapping',
188 'bao' => 'CRM_Core_DAO_ActionMapping',
189 'localizable' => 0,
190 ) ,
191 'entity_date_start' => array(
192 'name' => 'entity_date_start',
193 'type' => CRM_Utils_Type::T_STRING,
194 'title' => ts('Entity Start Date') ,
195 'description' => 'Entity date',
196 'maxlength' => 64,
197 'size' => CRM_Utils_Type::BIG,
198 'table_name' => 'civicrm_action_mapping',
199 'entity' => 'ActionMapping',
200 'bao' => 'CRM_Core_DAO_ActionMapping',
201 'localizable' => 0,
202 ) ,
203 'entity_date_end' => array(
204 'name' => 'entity_date_end',
205 'type' => CRM_Utils_Type::T_STRING,
206 'title' => ts('Entity End Date') ,
207 'description' => 'Entity date',
208 'maxlength' => 64,
209 'size' => CRM_Utils_Type::BIG,
210 'table_name' => 'civicrm_action_mapping',
211 'entity' => 'ActionMapping',
212 'bao' => 'CRM_Core_DAO_ActionMapping',
213 'localizable' => 0,
214 ) ,
215 'entity_recipient' => array(
216 'name' => 'entity_recipient',
217 'type' => CRM_Utils_Type::T_STRING,
218 'title' => ts('Entity Recipient') ,
219 'description' => 'Entity recipient',
220 'maxlength' => 64,
221 'size' => CRM_Utils_Type::BIG,
222 'table_name' => 'civicrm_action_mapping',
223 'entity' => 'ActionMapping',
224 'bao' => 'CRM_Core_DAO_ActionMapping',
225 'localizable' => 0,
226 ) ,
227 );
228 CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
229 }
230 return Civi::$statics[__CLASS__]['fields'];
231 }
232 /**
233 * Return a mapping from field-name to the corresponding key (as used in fields()).
234 *
235 * @return array
236 * Array(string $name => string $uniqueName).
237 */
238 static function &fieldKeys() {
239 if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
240 Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
241 }
242 return Civi::$statics[__CLASS__]['fieldKeys'];
243 }
244 /**
245 * Returns the names of this table
246 *
247 * @return string
248 */
249 static function getTableName() {
250 return self::$_tableName;
251 }
252 /**
253 * Returns if this table needs to be logged
254 *
255 * @return boolean
256 */
257 function getLog() {
258 return self::$_log;
259 }
260 /**
261 * Returns the list of fields that can be imported
262 *
263 * @param bool $prefix
264 *
265 * @return array
266 */
267 static function &import($prefix = false) {
268 $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'action_mapping', $prefix, array());
269 return $r;
270 }
271 /**
272 * Returns the list of fields that can be exported
273 *
274 * @param bool $prefix
275 *
276 * @return array
277 */
278 static function &export($prefix = false) {
279 $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'action_mapping', $prefix, array());
280 return $r;
281 }
282 /**
283 * Returns the list of indices
284 */
285 public static function indices($localize = TRUE) {
286 $indices = array();
287 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
288 }
289 }