5 * @copyright CiviCRM LLC (c) 2004-2018
7 * Generated from xml/schema/CRM/Core/ActionMapping.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
9 * (GenCodeChecksum:3ae720be63fdf4626db2d1508c2d8f44)
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 static $_tableName = 'civicrm_action_mapping';
25 * Should CiviCRM log any modifications to this table in the civicrm_log table.
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 'table_name' => 'civicrm_action_mapping',
114 'entity' => 'ActionMapping',
115 'bao' => 'CRM_Core_DAO_ActionMapping',
120 'type' => CRM_Utils_Type
::T_STRING
,
121 'title' => ts('Action Mapping Entity'),
122 'description' => 'Entity for which the reminder is created',
124 'size' => CRM_Utils_Type
::BIG
,
125 'table_name' => 'civicrm_action_mapping',
126 'entity' => 'ActionMapping',
127 'bao' => 'CRM_Core_DAO_ActionMapping',
131 'name' => 'entity_value',
132 'type' => CRM_Utils_Type
::T_STRING
,
133 'title' => ts('Action Mapping Entity Value'),
134 'description' => 'Entity value',
136 'size' => CRM_Utils_Type
::BIG
,
137 'table_name' => 'civicrm_action_mapping',
138 'entity' => 'ActionMapping',
139 'bao' => 'CRM_Core_DAO_ActionMapping',
142 'entity_value_label' => [
143 'name' => 'entity_value_label',
144 'type' => CRM_Utils_Type
::T_STRING
,
145 'title' => ts('Value Label'),
146 'description' => 'Entity value label',
148 'size' => CRM_Utils_Type
::BIG
,
149 'table_name' => 'civicrm_action_mapping',
150 'entity' => 'ActionMapping',
151 'bao' => 'CRM_Core_DAO_ActionMapping',
155 'name' => 'entity_status',
156 'type' => CRM_Utils_Type
::T_STRING
,
157 'title' => ts('Status'),
158 'description' => 'Entity status',
160 'size' => CRM_Utils_Type
::BIG
,
161 'table_name' => 'civicrm_action_mapping',
162 'entity' => 'ActionMapping',
163 'bao' => 'CRM_Core_DAO_ActionMapping',
166 'entity_status_label' => [
167 'name' => 'entity_status_label',
168 'type' => CRM_Utils_Type
::T_STRING
,
169 'title' => ts('Status Label'),
170 'description' => 'Entity status label',
172 'size' => CRM_Utils_Type
::BIG
,
173 'table_name' => 'civicrm_action_mapping',
174 'entity' => 'ActionMapping',
175 'bao' => 'CRM_Core_DAO_ActionMapping',
178 'entity_date_start' => [
179 'name' => 'entity_date_start',
180 'type' => CRM_Utils_Type
::T_STRING
,
181 'title' => ts('Entity Start Date'),
182 'description' => 'Entity date',
184 'size' => CRM_Utils_Type
::BIG
,
185 'table_name' => 'civicrm_action_mapping',
186 'entity' => 'ActionMapping',
187 'bao' => 'CRM_Core_DAO_ActionMapping',
190 'entity_date_end' => [
191 'name' => 'entity_date_end',
192 'type' => CRM_Utils_Type
::T_STRING
,
193 'title' => ts('Entity End Date'),
194 'description' => 'Entity date',
196 'size' => CRM_Utils_Type
::BIG
,
197 'table_name' => 'civicrm_action_mapping',
198 'entity' => 'ActionMapping',
199 'bao' => 'CRM_Core_DAO_ActionMapping',
202 'entity_recipient' => [
203 'name' => 'entity_recipient',
204 'type' => CRM_Utils_Type
::T_STRING
,
205 'title' => ts('Entity Recipient'),
206 'description' => 'Entity recipient',
208 'size' => CRM_Utils_Type
::BIG
,
209 'table_name' => 'civicrm_action_mapping',
210 'entity' => 'ActionMapping',
211 'bao' => 'CRM_Core_DAO_ActionMapping',
215 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
217 return Civi
::$statics[__CLASS__
]['fields'];
221 * Return a mapping from field-name to the corresponding key (as used in fields()).
224 * Array(string $name => string $uniqueName).
226 public static function &fieldKeys() {
227 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
228 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
230 return Civi
::$statics[__CLASS__
]['fieldKeys'];
234 * Returns the names of this table
238 public static function getTableName() {
239 return self
::$_tableName;
243 * Returns if this table needs to be logged
247 public function getLog() {
252 * Returns the list of fields that can be imported
254 * @param bool $prefix
258 public static function &import($prefix = FALSE) {
259 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'action_mapping', $prefix, []);
264 * Returns the list of fields that can be exported
266 * @param bool $prefix
270 public static function &export($prefix = FALSE) {
271 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'action_mapping', $prefix, []);
276 * Returns the list of indices
278 * @param bool $localize
282 public static function indices($localize = TRUE) {
284 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;