Merge pull request #8916 from cividesk/CRM-19256-4.7
[civicrm-core.git] / CRM / Core / DAO / ActionMapping.php
CommitLineData
e501603b
TO
1<?php
2/*
3+--------------------------------------------------------------------+
4| CiviCRM version 4.7 |
5+--------------------------------------------------------------------+
0f03f337 6| Copyright CiviCRM LLC (c) 2004-2017 |
e501603b
TO
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
0f03f337 29 * @copyright CiviCRM LLC (c) 2004-2017
e501603b
TO
30 *
31 * Generated from xml/schema/CRM/Core/ActionMapping.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
437fafcf 33 * (GenCodeChecksum:cf61768a3400766af641f4d6e9f6cba8)
e501603b
TO
34 */
35require_once 'CRM/Core/DAO.php';
36require_once 'CRM/Utils/Type.php';
f41f0342 37/**
38 * CRM_Core_DAO_ActionMapping constructor.
39 */
e501603b
TO
40class CRM_Core_DAO_ActionMapping extends CRM_Core_DAO {
41 /**
f41f0342 42 * Static instance to hold the table name.
e501603b
TO
43 *
44 * @var string
45 */
46 static $_tableName = 'civicrm_action_mapping';
e501603b 47 /**
f41f0342 48 * Should CiviCRM log any modifications to this table in the civicrm_log table.
e501603b
TO
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 /**
f41f0342 107 * Class constructor.
e501603b
TO
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() {
346aaaba
TO
119 if (!isset(Civi::$statics[__CLASS__]['fields'])) {
120 Civi::$statics[__CLASS__]['fields'] = array(
e501603b
TO
121 'id' => array(
122 'name' => 'id',
123 'type' => CRM_Utils_Type::T_INT,
124 'title' => ts('Action Mapping ID') ,
125 'required' => true,
126 ) ,
127 'entity' => array(
128 'name' => 'entity',
129 'type' => CRM_Utils_Type::T_STRING,
130 'title' => ts('Action Mapping Entity') ,
131 'description' => 'Entity for which the reminder is created',
132 'maxlength' => 64,
133 'size' => CRM_Utils_Type::BIG,
134 ) ,
135 'entity_value' => array(
136 'name' => 'entity_value',
137 'type' => CRM_Utils_Type::T_STRING,
138 'title' => ts('Action Mapping Entity Value') ,
139 'description' => 'Entity value',
140 'maxlength' => 64,
141 'size' => CRM_Utils_Type::BIG,
142 ) ,
143 'entity_value_label' => array(
144 'name' => 'entity_value_label',
145 'type' => CRM_Utils_Type::T_STRING,
146 'title' => ts('Value Label') ,
147 'description' => 'Entity value label',
148 'maxlength' => 64,
149 'size' => CRM_Utils_Type::BIG,
150 ) ,
151 'entity_status' => array(
152 'name' => 'entity_status',
153 'type' => CRM_Utils_Type::T_STRING,
154 'title' => ts('Status') ,
155 'description' => 'Entity status',
156 'maxlength' => 64,
157 'size' => CRM_Utils_Type::BIG,
158 ) ,
159 'entity_status_label' => array(
160 'name' => 'entity_status_label',
161 'type' => CRM_Utils_Type::T_STRING,
162 'title' => ts('Status Label') ,
163 'description' => 'Entity status label',
164 'maxlength' => 64,
165 'size' => CRM_Utils_Type::BIG,
166 ) ,
167 'entity_date_start' => array(
168 'name' => 'entity_date_start',
169 'type' => CRM_Utils_Type::T_STRING,
170 'title' => ts('Entity Start Date') ,
171 'description' => 'Entity date',
172 'maxlength' => 64,
173 'size' => CRM_Utils_Type::BIG,
174 ) ,
175 'entity_date_end' => array(
176 'name' => 'entity_date_end',
177 'type' => CRM_Utils_Type::T_STRING,
178 'title' => ts('Entity End Date') ,
179 'description' => 'Entity date',
180 'maxlength' => 64,
181 'size' => CRM_Utils_Type::BIG,
182 ) ,
183 'entity_recipient' => array(
184 'name' => 'entity_recipient',
185 'type' => CRM_Utils_Type::T_STRING,
186 'title' => ts('Entity Recipient') ,
187 'description' => 'Entity recipient',
188 'maxlength' => 64,
189 'size' => CRM_Utils_Type::BIG,
190 ) ,
191 );
346aaaba 192 CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
e501603b 193 }
346aaaba 194 return Civi::$statics[__CLASS__]['fields'];
e501603b
TO
195 }
196 /**
bd8e0b14 197 * Return a mapping from field-name to the corresponding key (as used in fields()).
e501603b
TO
198 *
199 * @return array
bd8e0b14 200 * Array(string $name => string $uniqueName).
e501603b
TO
201 */
202 static function &fieldKeys() {
bd8e0b14
TO
203 if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) {
204 Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields()));
e501603b 205 }
bd8e0b14 206 return Civi::$statics[__CLASS__]['fieldKeys'];
e501603b
TO
207 }
208 /**
209 * Returns the names of this table
210 *
211 * @return string
212 */
213 static function getTableName() {
214 return self::$_tableName;
215 }
216 /**
217 * Returns if this table needs to be logged
218 *
219 * @return boolean
220 */
221 function getLog() {
222 return self::$_log;
223 }
224 /**
225 * Returns the list of fields that can be imported
226 *
227 * @param bool $prefix
228 *
229 * @return array
230 */
231 static function &import($prefix = false) {
60808919
TO
232 $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'action_mapping', $prefix, array());
233 return $r;
e501603b
TO
234 }
235 /**
236 * Returns the list of fields that can be exported
237 *
238 * @param bool $prefix
239 *
240 * @return array
241 */
242 static function &export($prefix = false) {
60808919
TO
243 $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'action_mapping', $prefix, array());
244 return $r;
e501603b
TO
245 }
246}