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:369620c3d8cd0ff237b5372cff2e041f)
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 localized title of this entity.
103 public static function getEntityTitle() {
104 return ts('Action Mappings');
108 * Returns all the column names of this table
112 public static function &fields() {
113 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
114 Civi
::$statics[__CLASS__
]['fields'] = [
117 'type' => CRM_Utils_Type
::T_INT
,
118 'title' => ts('Action Mapping ID'),
120 'where' => 'civicrm_action_mapping.id',
121 'table_name' => 'civicrm_action_mapping',
122 'entity' => 'ActionMapping',
123 'bao' => 'CRM_Core_DAO_ActionMapping',
128 'type' => CRM_Utils_Type
::T_STRING
,
129 'title' => ts('Action Mapping Entity'),
130 'description' => ts('Entity for which the reminder is created'),
132 'size' => CRM_Utils_Type
::BIG
,
133 'where' => 'civicrm_action_mapping.entity',
134 'table_name' => 'civicrm_action_mapping',
135 'entity' => 'ActionMapping',
136 'bao' => 'CRM_Core_DAO_ActionMapping',
140 'name' => 'entity_value',
141 'type' => CRM_Utils_Type
::T_STRING
,
142 'title' => ts('Action Mapping Entity Value'),
143 'description' => ts('Entity value'),
145 'size' => CRM_Utils_Type
::BIG
,
146 'where' => 'civicrm_action_mapping.entity_value',
147 'table_name' => 'civicrm_action_mapping',
148 'entity' => 'ActionMapping',
149 'bao' => 'CRM_Core_DAO_ActionMapping',
152 'entity_value_label' => [
153 'name' => 'entity_value_label',
154 'type' => CRM_Utils_Type
::T_STRING
,
155 'title' => ts('Value Label'),
156 'description' => ts('Entity value label'),
158 'size' => CRM_Utils_Type
::BIG
,
159 'where' => 'civicrm_action_mapping.entity_value_label',
160 'table_name' => 'civicrm_action_mapping',
161 'entity' => 'ActionMapping',
162 'bao' => 'CRM_Core_DAO_ActionMapping',
166 'name' => 'entity_status',
167 'type' => CRM_Utils_Type
::T_STRING
,
168 'title' => ts('Status'),
169 'description' => ts('Entity status'),
171 'size' => CRM_Utils_Type
::BIG
,
172 'where' => 'civicrm_action_mapping.entity_status',
173 'table_name' => 'civicrm_action_mapping',
174 'entity' => 'ActionMapping',
175 'bao' => 'CRM_Core_DAO_ActionMapping',
178 'entity_status_label' => [
179 'name' => 'entity_status_label',
180 'type' => CRM_Utils_Type
::T_STRING
,
181 'title' => ts('Status Label'),
182 'description' => ts('Entity status label'),
184 'size' => CRM_Utils_Type
::BIG
,
185 'where' => 'civicrm_action_mapping.entity_status_label',
186 'table_name' => 'civicrm_action_mapping',
187 'entity' => 'ActionMapping',
188 'bao' => 'CRM_Core_DAO_ActionMapping',
191 'entity_date_start' => [
192 'name' => 'entity_date_start',
193 'type' => CRM_Utils_Type
::T_STRING
,
194 'title' => ts('Entity Start Date'),
195 'description' => ts('Entity date'),
197 'size' => CRM_Utils_Type
::BIG
,
198 'where' => 'civicrm_action_mapping.entity_date_start',
199 'table_name' => 'civicrm_action_mapping',
200 'entity' => 'ActionMapping',
201 'bao' => 'CRM_Core_DAO_ActionMapping',
204 'entity_date_end' => [
205 'name' => 'entity_date_end',
206 'type' => CRM_Utils_Type
::T_STRING
,
207 'title' => ts('Entity End Date'),
208 'description' => ts('Entity date'),
210 'size' => CRM_Utils_Type
::BIG
,
211 'where' => 'civicrm_action_mapping.entity_date_end',
212 'table_name' => 'civicrm_action_mapping',
213 'entity' => 'ActionMapping',
214 'bao' => 'CRM_Core_DAO_ActionMapping',
217 'entity_recipient' => [
218 'name' => 'entity_recipient',
219 'type' => CRM_Utils_Type
::T_STRING
,
220 'title' => ts('Entity Recipient'),
221 'description' => ts('Entity recipient'),
223 'size' => CRM_Utils_Type
::BIG
,
224 'where' => 'civicrm_action_mapping.entity_recipient',
225 'table_name' => 'civicrm_action_mapping',
226 'entity' => 'ActionMapping',
227 'bao' => 'CRM_Core_DAO_ActionMapping',
231 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
233 return Civi
::$statics[__CLASS__
]['fields'];
237 * Return a mapping from field-name to the corresponding key (as used in fields()).
240 * Array(string $name => string $uniqueName).
242 public static function &fieldKeys() {
243 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
244 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
246 return Civi
::$statics[__CLASS__
]['fieldKeys'];
250 * Returns the names of this table
254 public static function getTableName() {
255 return self
::$_tableName;
259 * Returns if this table needs to be logged
263 public function getLog() {
268 * Returns the list of fields that can be imported
270 * @param bool $prefix
274 public static function &import($prefix = FALSE) {
275 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'action_mapping', $prefix, []);
280 * Returns the list of fields that can be exported
282 * @param bool $prefix
286 public static function &export($prefix = FALSE) {
287 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'action_mapping', $prefix, []);
292 * Returns the list of indices
294 * @param bool $localize
298 public static function indices($localize = TRUE) {
300 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;