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:b597d359bb254799b8756ee555156dc3)
13 * Database access object for the ActionMapping entity.
15 class CRM_Core_DAO_ActionMapping
extends CRM_Core_DAO
{
18 * Static instance to hold the table name.
22 public static $_tableName = 'civicrm_action_mapping';
25 * Should CiviCRM log any modifications to this table in the civicrm_log table.
29 public static $_log = FALSE;
37 * Entity for which the reminder is created
55 public $entity_value_label;
62 public $entity_status;
69 public $entity_status_label;
76 public $entity_date_start;
83 public $entity_date_end;
90 public $entity_recipient;
95 public function __construct() {
96 $this->__table
= 'civicrm_action_mapping';
97 parent
::__construct();
101 * Returns all the column names of this table
105 public static function &fields() {
106 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
107 Civi
::$statics[__CLASS__
]['fields'] = [
110 'type' => CRM_Utils_Type
::T_INT
,
111 'title' => ts('Action Mapping ID'),
113 'where' => 'civicrm_action_mapping.id',
114 'table_name' => 'civicrm_action_mapping',
115 'entity' => 'ActionMapping',
116 'bao' => 'CRM_Core_DAO_ActionMapping',
121 'type' => CRM_Utils_Type
::T_STRING
,
122 'title' => ts('Action Mapping Entity'),
123 'description' => ts('Entity for which the reminder is created'),
125 'size' => CRM_Utils_Type
::BIG
,
126 'where' => 'civicrm_action_mapping.entity',
127 'table_name' => 'civicrm_action_mapping',
128 'entity' => 'ActionMapping',
129 'bao' => 'CRM_Core_DAO_ActionMapping',
133 'name' => 'entity_value',
134 'type' => CRM_Utils_Type
::T_STRING
,
135 'title' => ts('Action Mapping Entity Value'),
136 'description' => ts('Entity value'),
138 'size' => CRM_Utils_Type
::BIG
,
139 'where' => 'civicrm_action_mapping.entity_value',
140 'table_name' => 'civicrm_action_mapping',
141 'entity' => 'ActionMapping',
142 'bao' => 'CRM_Core_DAO_ActionMapping',
145 'entity_value_label' => [
146 'name' => 'entity_value_label',
147 'type' => CRM_Utils_Type
::T_STRING
,
148 'title' => ts('Value Label'),
149 'description' => ts('Entity value label'),
151 'size' => CRM_Utils_Type
::BIG
,
152 'where' => 'civicrm_action_mapping.entity_value_label',
153 'table_name' => 'civicrm_action_mapping',
154 'entity' => 'ActionMapping',
155 'bao' => 'CRM_Core_DAO_ActionMapping',
159 'name' => 'entity_status',
160 'type' => CRM_Utils_Type
::T_STRING
,
161 'title' => ts('Status'),
162 'description' => ts('Entity status'),
164 'size' => CRM_Utils_Type
::BIG
,
165 'where' => 'civicrm_action_mapping.entity_status',
166 'table_name' => 'civicrm_action_mapping',
167 'entity' => 'ActionMapping',
168 'bao' => 'CRM_Core_DAO_ActionMapping',
171 'entity_status_label' => [
172 'name' => 'entity_status_label',
173 'type' => CRM_Utils_Type
::T_STRING
,
174 'title' => ts('Status Label'),
175 'description' => ts('Entity status label'),
177 'size' => CRM_Utils_Type
::BIG
,
178 'where' => 'civicrm_action_mapping.entity_status_label',
179 'table_name' => 'civicrm_action_mapping',
180 'entity' => 'ActionMapping',
181 'bao' => 'CRM_Core_DAO_ActionMapping',
184 'entity_date_start' => [
185 'name' => 'entity_date_start',
186 'type' => CRM_Utils_Type
::T_STRING
,
187 'title' => ts('Entity Start Date'),
188 'description' => ts('Entity date'),
190 'size' => CRM_Utils_Type
::BIG
,
191 'where' => 'civicrm_action_mapping.entity_date_start',
192 'table_name' => 'civicrm_action_mapping',
193 'entity' => 'ActionMapping',
194 'bao' => 'CRM_Core_DAO_ActionMapping',
197 'entity_date_end' => [
198 'name' => 'entity_date_end',
199 'type' => CRM_Utils_Type
::T_STRING
,
200 'title' => ts('Entity End Date'),
201 'description' => ts('Entity date'),
203 'size' => CRM_Utils_Type
::BIG
,
204 'where' => 'civicrm_action_mapping.entity_date_end',
205 'table_name' => 'civicrm_action_mapping',
206 'entity' => 'ActionMapping',
207 'bao' => 'CRM_Core_DAO_ActionMapping',
210 'entity_recipient' => [
211 'name' => 'entity_recipient',
212 'type' => CRM_Utils_Type
::T_STRING
,
213 'title' => ts('Entity Recipient'),
214 'description' => ts('Entity recipient'),
216 'size' => CRM_Utils_Type
::BIG
,
217 'where' => 'civicrm_action_mapping.entity_recipient',
218 'table_name' => 'civicrm_action_mapping',
219 'entity' => 'ActionMapping',
220 'bao' => 'CRM_Core_DAO_ActionMapping',
224 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
226 return Civi
::$statics[__CLASS__
]['fields'];
230 * Return a mapping from field-name to the corresponding key (as used in fields()).
233 * Array(string $name => string $uniqueName).
235 public static function &fieldKeys() {
236 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
237 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
239 return Civi
::$statics[__CLASS__
]['fieldKeys'];
243 * Returns the names of this table
247 public static function getTableName() {
248 return self
::$_tableName;
252 * Returns if this table needs to be logged
256 public function getLog() {
261 * Returns the list of fields that can be imported
263 * @param bool $prefix
267 public static function &import($prefix = FALSE) {
268 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'action_mapping', $prefix, []);
273 * Returns the list of fields that can be exported
275 * @param bool $prefix
279 public static function &export($prefix = FALSE) {
280 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'action_mapping', $prefix, []);
285 * Returns the list of indices
287 * @param bool $localize
291 public static function indices($localize = TRUE) {
293 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;