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:bbddce29b37d3352bf681595ee0d3ffd)
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',
138 'type' => CRM_Utils_Type
::T_STRING
,
139 'title' => ts('Action Mapping Entity'),
140 'description' => ts('Entity for which the reminder is created'),
142 'size' => CRM_Utils_Type
::BIG
,
143 'where' => 'civicrm_action_mapping.entity',
144 'table_name' => 'civicrm_action_mapping',
145 'entity' => 'ActionMapping',
146 'bao' => 'CRM_Core_DAO_ActionMapping',
151 'name' => 'entity_value',
152 'type' => CRM_Utils_Type
::T_STRING
,
153 'title' => ts('Action Mapping Entity Value'),
154 'description' => ts('Entity value'),
156 'size' => CRM_Utils_Type
::BIG
,
157 'where' => 'civicrm_action_mapping.entity_value',
158 'table_name' => 'civicrm_action_mapping',
159 'entity' => 'ActionMapping',
160 'bao' => 'CRM_Core_DAO_ActionMapping',
164 'entity_value_label' => [
165 'name' => 'entity_value_label',
166 'type' => CRM_Utils_Type
::T_STRING
,
167 'title' => ts('Value Label'),
168 'description' => ts('Entity value label'),
170 'size' => CRM_Utils_Type
::BIG
,
171 'where' => 'civicrm_action_mapping.entity_value_label',
172 'table_name' => 'civicrm_action_mapping',
173 'entity' => 'ActionMapping',
174 'bao' => 'CRM_Core_DAO_ActionMapping',
179 'name' => 'entity_status',
180 'type' => CRM_Utils_Type
::T_STRING
,
181 'title' => ts('Status'),
182 'description' => ts('Entity status'),
184 'size' => CRM_Utils_Type
::BIG
,
185 'where' => 'civicrm_action_mapping.entity_status',
186 'table_name' => 'civicrm_action_mapping',
187 'entity' => 'ActionMapping',
188 'bao' => 'CRM_Core_DAO_ActionMapping',
192 'entity_status_label' => [
193 'name' => 'entity_status_label',
194 'type' => CRM_Utils_Type
::T_STRING
,
195 'title' => ts('Status Label'),
196 'description' => ts('Entity status label'),
198 'size' => CRM_Utils_Type
::BIG
,
199 'where' => 'civicrm_action_mapping.entity_status_label',
200 'table_name' => 'civicrm_action_mapping',
201 'entity' => 'ActionMapping',
202 'bao' => 'CRM_Core_DAO_ActionMapping',
206 'entity_date_start' => [
207 'name' => 'entity_date_start',
208 'type' => CRM_Utils_Type
::T_STRING
,
209 'title' => ts('Entity Start Date'),
210 'description' => ts('Entity date'),
212 'size' => CRM_Utils_Type
::BIG
,
213 'where' => 'civicrm_action_mapping.entity_date_start',
214 'table_name' => 'civicrm_action_mapping',
215 'entity' => 'ActionMapping',
216 'bao' => 'CRM_Core_DAO_ActionMapping',
220 'entity_date_end' => [
221 'name' => 'entity_date_end',
222 'type' => CRM_Utils_Type
::T_STRING
,
223 'title' => ts('Entity End Date'),
224 'description' => ts('Entity date'),
226 'size' => CRM_Utils_Type
::BIG
,
227 'where' => 'civicrm_action_mapping.entity_date_end',
228 'table_name' => 'civicrm_action_mapping',
229 'entity' => 'ActionMapping',
230 'bao' => 'CRM_Core_DAO_ActionMapping',
234 'entity_recipient' => [
235 'name' => 'entity_recipient',
236 'type' => CRM_Utils_Type
::T_STRING
,
237 'title' => ts('Entity Recipient'),
238 'description' => ts('Entity recipient'),
240 'size' => CRM_Utils_Type
::BIG
,
241 'where' => 'civicrm_action_mapping.entity_recipient',
242 'table_name' => 'civicrm_action_mapping',
243 'entity' => 'ActionMapping',
244 'bao' => 'CRM_Core_DAO_ActionMapping',
249 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
251 return Civi
::$statics[__CLASS__
]['fields'];
255 * Return a mapping from field-name to the corresponding key (as used in fields()).
258 * Array(string $name => string $uniqueName).
260 public static function &fieldKeys() {
261 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
262 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
264 return Civi
::$statics[__CLASS__
]['fieldKeys'];
268 * Returns the names of this table
272 public static function getTableName() {
273 return self
::$_tableName;
277 * Returns if this table needs to be logged
281 public function getLog() {
286 * Returns the list of fields that can be imported
288 * @param bool $prefix
292 public static function &import($prefix = FALSE) {
293 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'action_mapping', $prefix, []);
298 * Returns the list of fields that can be exported
300 * @param bool $prefix
304 public static function &export($prefix = FALSE) {
305 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'action_mapping', $prefix, []);
310 * Returns the list of indices
312 * @param bool $localize
316 public static function indices($localize = TRUE) {
318 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;