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:7db8e13984f33629f584a8a54c37fd4a)
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;
39 * Entity for which the reminder is created
57 public $entity_value_label;
64 public $entity_status;
71 public $entity_status_label;
78 public $entity_date_start;
85 public $entity_date_end;
92 public $entity_recipient;
97 public function __construct() {
98 $this->__table
= 'civicrm_action_mapping';
99 parent
::__construct();
103 * Returns localized title of this entity.
105 * @param bool $plural
106 * Whether to return the plural version of the title.
108 public static function getEntityTitle($plural = FALSE) {
109 return $plural ?
ts('Action Mappings') : ts('Action Mapping');
113 * Returns all the column names of this table
117 public static function &fields() {
118 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
119 Civi
::$statics[__CLASS__
]['fields'] = [
122 'type' => CRM_Utils_Type
::T_INT
,
123 'title' => ts('Action Mapping ID'),
125 'where' => 'civicrm_action_mapping.id',
126 'table_name' => 'civicrm_action_mapping',
127 'entity' => 'ActionMapping',
128 'bao' => 'CRM_Core_DAO_ActionMapping',
134 'type' => CRM_Utils_Type
::T_STRING
,
135 'title' => ts('Action Mapping Entity'),
136 'description' => ts('Entity for which the reminder is created'),
138 'size' => CRM_Utils_Type
::BIG
,
139 'where' => 'civicrm_action_mapping.entity',
140 'table_name' => 'civicrm_action_mapping',
141 'entity' => 'ActionMapping',
142 'bao' => 'CRM_Core_DAO_ActionMapping',
147 'name' => 'entity_value',
148 'type' => CRM_Utils_Type
::T_STRING
,
149 'title' => ts('Action Mapping Entity Value'),
150 'description' => ts('Entity value'),
152 'size' => CRM_Utils_Type
::BIG
,
153 'where' => 'civicrm_action_mapping.entity_value',
154 'table_name' => 'civicrm_action_mapping',
155 'entity' => 'ActionMapping',
156 'bao' => 'CRM_Core_DAO_ActionMapping',
160 'entity_value_label' => [
161 'name' => 'entity_value_label',
162 'type' => CRM_Utils_Type
::T_STRING
,
163 'title' => ts('Value Label'),
164 'description' => ts('Entity value label'),
166 'size' => CRM_Utils_Type
::BIG
,
167 'where' => 'civicrm_action_mapping.entity_value_label',
168 'table_name' => 'civicrm_action_mapping',
169 'entity' => 'ActionMapping',
170 'bao' => 'CRM_Core_DAO_ActionMapping',
175 'name' => 'entity_status',
176 'type' => CRM_Utils_Type
::T_STRING
,
177 'title' => ts('Status'),
178 'description' => ts('Entity status'),
180 'size' => CRM_Utils_Type
::BIG
,
181 'where' => 'civicrm_action_mapping.entity_status',
182 'table_name' => 'civicrm_action_mapping',
183 'entity' => 'ActionMapping',
184 'bao' => 'CRM_Core_DAO_ActionMapping',
188 'entity_status_label' => [
189 'name' => 'entity_status_label',
190 'type' => CRM_Utils_Type
::T_STRING
,
191 'title' => ts('Status Label'),
192 'description' => ts('Entity status label'),
194 'size' => CRM_Utils_Type
::BIG
,
195 'where' => 'civicrm_action_mapping.entity_status_label',
196 'table_name' => 'civicrm_action_mapping',
197 'entity' => 'ActionMapping',
198 'bao' => 'CRM_Core_DAO_ActionMapping',
202 'entity_date_start' => [
203 'name' => 'entity_date_start',
204 'type' => CRM_Utils_Type
::T_STRING
,
205 'title' => ts('Entity Start Date'),
206 'description' => ts('Entity date'),
208 'size' => CRM_Utils_Type
::BIG
,
209 'where' => 'civicrm_action_mapping.entity_date_start',
210 'table_name' => 'civicrm_action_mapping',
211 'entity' => 'ActionMapping',
212 'bao' => 'CRM_Core_DAO_ActionMapping',
216 'entity_date_end' => [
217 'name' => 'entity_date_end',
218 'type' => CRM_Utils_Type
::T_STRING
,
219 'title' => ts('Entity End Date'),
220 'description' => ts('Entity date'),
222 'size' => CRM_Utils_Type
::BIG
,
223 'where' => 'civicrm_action_mapping.entity_date_end',
224 'table_name' => 'civicrm_action_mapping',
225 'entity' => 'ActionMapping',
226 'bao' => 'CRM_Core_DAO_ActionMapping',
230 'entity_recipient' => [
231 'name' => 'entity_recipient',
232 'type' => CRM_Utils_Type
::T_STRING
,
233 'title' => ts('Entity Recipient'),
234 'description' => ts('Entity recipient'),
236 'size' => CRM_Utils_Type
::BIG
,
237 'where' => 'civicrm_action_mapping.entity_recipient',
238 'table_name' => 'civicrm_action_mapping',
239 'entity' => 'ActionMapping',
240 'bao' => 'CRM_Core_DAO_ActionMapping',
245 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
247 return Civi
::$statics[__CLASS__
]['fields'];
251 * Return a mapping from field-name to the corresponding key (as used in fields()).
254 * Array(string $name => string $uniqueName).
256 public static function &fieldKeys() {
257 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
258 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
260 return Civi
::$statics[__CLASS__
]['fieldKeys'];
264 * Returns the names of this table
268 public static function getTableName() {
269 return self
::$_tableName;
273 * Returns if this table needs to be logged
277 public function getLog() {
282 * Returns the list of fields that can be imported
284 * @param bool $prefix
288 public static function &import($prefix = FALSE) {
289 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'action_mapping', $prefix, []);
294 * Returns the list of fields that can be exported
296 * @param bool $prefix
300 public static function &export($prefix = FALSE) {
301 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'action_mapping', $prefix, []);
306 * Returns the list of indices
308 * @param bool $localize
312 public static function indices($localize = TRUE) {
314 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;