5 * @copyright CiviCRM LLC https://civicrm.org/licensing
7 * Generated from xml/schema/CRM/Core/ActionMapping.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
9 * (GenCodeChecksum:47aaf423930a3ec40089a4b21caaae2c)
13 * Database access object for the ActionMapping entity.
15 class CRM_Core_DAO_ActionMapping
extends CRM_Core_DAO
{
16 const EXT
= 'civicrm';
17 const TABLE_ADDED
= '3.4';
20 * Static instance to hold the table name.
24 public static $_tableName = 'civicrm_action_mapping';
27 * Should CiviCRM log any modifications to this table in the civicrm_log table.
31 public static $_log = FALSE;
34 * @var int|string|null
35 * (SQL type: int unsigned)
36 * Note that values will be retrieved from the database as a string.
41 * Entity for which the reminder is created
44 * (SQL type: varchar(64))
45 * Note that values will be retrieved from the database as a string.
53 * (SQL type: varchar(64))
54 * Note that values will be retrieved from the database as a string.
62 * (SQL type: varchar(64))
63 * Note that values will be retrieved from the database as a string.
65 public $entity_value_label;
71 * (SQL type: varchar(64))
72 * Note that values will be retrieved from the database as a string.
74 public $entity_status;
80 * (SQL type: varchar(64))
81 * Note that values will be retrieved from the database as a string.
83 public $entity_status_label;
89 * (SQL type: varchar(64))
90 * Note that values will be retrieved from the database as a string.
92 public $entity_date_start;
98 * (SQL type: varchar(64))
99 * Note that values will be retrieved from the database as a string.
101 public $entity_date_end;
107 * (SQL type: varchar(64))
108 * Note that values will be retrieved from the database as a string.
110 public $entity_recipient;
115 public function __construct() {
116 $this->__table
= 'civicrm_action_mapping';
117 parent
::__construct();
121 * Returns localized title of this entity.
123 * @param bool $plural
124 * Whether to return the plural version of the title.
126 public static function getEntityTitle($plural = FALSE) {
127 return $plural ?
ts('Action Mappings') : ts('Action Mapping');
131 * Returns all the column names of this table
135 public static function &fields() {
136 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
137 Civi
::$statics[__CLASS__
]['fields'] = [
140 'type' => CRM_Utils_Type
::T_INT
,
141 'title' => ts('Action Mapping ID'),
143 'where' => 'civicrm_action_mapping.id',
144 'table_name' => 'civicrm_action_mapping',
145 'entity' => 'ActionMapping',
146 'bao' => 'CRM_Core_DAO_ActionMapping',
156 'type' => CRM_Utils_Type
::T_STRING
,
157 'title' => ts('Action Mapping Entity'),
158 'description' => ts('Entity for which the reminder is created'),
160 'size' => CRM_Utils_Type
::BIG
,
161 'where' => 'civicrm_action_mapping.entity',
162 'table_name' => 'civicrm_action_mapping',
163 'entity' => 'ActionMapping',
164 'bao' => 'CRM_Core_DAO_ActionMapping',
169 'name' => 'entity_value',
170 'type' => CRM_Utils_Type
::T_STRING
,
171 'title' => ts('Action Mapping Entity Value'),
172 'description' => ts('Entity value'),
174 'size' => CRM_Utils_Type
::BIG
,
175 'where' => 'civicrm_action_mapping.entity_value',
176 'table_name' => 'civicrm_action_mapping',
177 'entity' => 'ActionMapping',
178 'bao' => 'CRM_Core_DAO_ActionMapping',
182 'entity_value_label' => [
183 'name' => 'entity_value_label',
184 'type' => CRM_Utils_Type
::T_STRING
,
185 'title' => ts('Value Label'),
186 'description' => ts('Entity value label'),
188 'size' => CRM_Utils_Type
::BIG
,
189 'where' => 'civicrm_action_mapping.entity_value_label',
190 'table_name' => 'civicrm_action_mapping',
191 'entity' => 'ActionMapping',
192 'bao' => 'CRM_Core_DAO_ActionMapping',
197 'name' => 'entity_status',
198 'type' => CRM_Utils_Type
::T_STRING
,
199 'title' => ts('Status'),
200 'description' => ts('Entity status'),
202 'size' => CRM_Utils_Type
::BIG
,
203 'where' => 'civicrm_action_mapping.entity_status',
204 'table_name' => 'civicrm_action_mapping',
205 'entity' => 'ActionMapping',
206 'bao' => 'CRM_Core_DAO_ActionMapping',
210 'entity_status_label' => [
211 'name' => 'entity_status_label',
212 'type' => CRM_Utils_Type
::T_STRING
,
213 'title' => ts('Status Label'),
214 'description' => ts('Entity status label'),
216 'size' => CRM_Utils_Type
::BIG
,
217 'where' => 'civicrm_action_mapping.entity_status_label',
218 'table_name' => 'civicrm_action_mapping',
219 'entity' => 'ActionMapping',
220 'bao' => 'CRM_Core_DAO_ActionMapping',
224 'entity_date_start' => [
225 'name' => 'entity_date_start',
226 'type' => CRM_Utils_Type
::T_STRING
,
227 'title' => ts('Entity Start Date'),
228 'description' => ts('Entity date'),
230 'size' => CRM_Utils_Type
::BIG
,
231 'where' => 'civicrm_action_mapping.entity_date_start',
232 'table_name' => 'civicrm_action_mapping',
233 'entity' => 'ActionMapping',
234 'bao' => 'CRM_Core_DAO_ActionMapping',
238 'entity_date_end' => [
239 'name' => 'entity_date_end',
240 'type' => CRM_Utils_Type
::T_STRING
,
241 'title' => ts('Entity End Date'),
242 'description' => ts('Entity date'),
244 'size' => CRM_Utils_Type
::BIG
,
245 'where' => 'civicrm_action_mapping.entity_date_end',
246 'table_name' => 'civicrm_action_mapping',
247 'entity' => 'ActionMapping',
248 'bao' => 'CRM_Core_DAO_ActionMapping',
252 'entity_recipient' => [
253 'name' => 'entity_recipient',
254 'type' => CRM_Utils_Type
::T_STRING
,
255 'title' => ts('Entity Recipient'),
256 'description' => ts('Entity recipient'),
258 'size' => CRM_Utils_Type
::BIG
,
259 'where' => 'civicrm_action_mapping.entity_recipient',
260 'table_name' => 'civicrm_action_mapping',
261 'entity' => 'ActionMapping',
262 'bao' => 'CRM_Core_DAO_ActionMapping',
267 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
269 return Civi
::$statics[__CLASS__
]['fields'];
273 * Return a mapping from field-name to the corresponding key (as used in fields()).
276 * Array(string $name => string $uniqueName).
278 public static function &fieldKeys() {
279 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
280 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
282 return Civi
::$statics[__CLASS__
]['fieldKeys'];
286 * Returns the names of this table
290 public static function getTableName() {
291 return self
::$_tableName;
295 * Returns if this table needs to be logged
299 public function getLog() {
304 * Returns the list of fields that can be imported
306 * @param bool $prefix
310 public static function &import($prefix = FALSE) {
311 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'action_mapping', $prefix, []);
316 * Returns the list of fields that can be exported
318 * @param bool $prefix
322 public static function &export($prefix = FALSE) {
323 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'action_mapping', $prefix, []);
328 * Returns the list of indices
330 * @param bool $localize
334 public static function indices($localize = TRUE) {
336 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;