3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.7 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2016 |
7 +--------------------------------------------------------------------+
8 | This file is a part of CiviCRM. |
10 | CiviCRM is free software; you can copy, modify, and distribute it |
11 | under the terms of the GNU Affero General Public License |
12 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
14 | CiviCRM is distributed in the hope that it will be useful, but |
15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
17 | See the GNU Affero General Public License for more details. |
19 | You should have received a copy of the GNU Affero General Public |
20 | License and the CiviCRM Licensing Exception along |
21 | with this program; if not, contact CiviCRM LLC |
22 | at info[AT]civicrm[DOT]org. If you have questions about the |
23 | GNU Affero General Public License or the licensing of CiviCRM, |
24 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
25 +--------------------------------------------------------------------+
29 * @copyright CiviCRM LLC (c) 2004-2016
31 * Generated from xml/schema/CRM/Core/ActionLog.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:721c03b2046e11d8774a5e14204a28d8)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
37 class CRM_Core_DAO_ActionLog
extends CRM_Core_DAO
{
39 * static instance to hold the table name
43 static $_tableName = 'civicrm_action_log';
45 * static value to see if we should log any modifications to
46 * this table in the civicrm_log table
63 * FK to id of the entity that the action was performed on. Pseudo - FK.
69 * name of the entity table for the above id, e.g. civicrm_activity, civicrm_participant
75 * FK to the action schedule that this action originated from.
79 public $action_schedule_id;
81 * date time that the action was performed on.
85 public $action_date_time;
87 * Was there any error sending the reminder?
93 * Description / text in case there was an error encountered.
99 * Keeps track of the sequence number of this repetition.
103 public $repetition_number;
105 * Stores the date from the entity which triggered this reminder action (e.g. membership.end_date for most membership renewal reminders)
109 public $reference_date;
113 * @return civicrm_action_log
115 function __construct() {
116 $this->__table
= 'civicrm_action_log';
117 parent
::__construct();
120 * Returns foreign keys and entity references
123 * [CRM_Core_Reference_Interface]
125 static function getReferenceColumns() {
126 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
127 Civi
::$statics[__CLASS__
]['links'] = static ::createReferenceColumns(__CLASS__
);
128 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName() , 'contact_id', 'civicrm_contact', 'id');
129 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName() , 'action_schedule_id', 'civicrm_action_schedule', 'id');
130 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Dynamic(self
::getTableName() , 'entity_id', NULL, 'id', 'entity_table');
131 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
133 return Civi
::$statics[__CLASS__
]['links'];
136 * Returns all the column names of this table
140 static function &fields() {
141 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
142 Civi
::$statics[__CLASS__
]['fields'] = array(
145 'type' => CRM_Utils_Type
::T_INT
,
146 'title' => ts('Action Schedule ID') ,
149 'contact_id' => array(
150 'name' => 'contact_id',
151 'type' => CRM_Utils_Type
::T_INT
,
152 'title' => ts('Action Schedule Contact ID') ,
153 'description' => 'FK to Contact ID',
154 'FKClassName' => 'CRM_Contact_DAO_Contact',
156 'entity_id' => array(
157 'name' => 'entity_id',
158 'type' => CRM_Utils_Type
::T_INT
,
159 'title' => ts('Entity ID') ,
160 'description' => 'FK to id of the entity that the action was performed on. Pseudo - FK.',
163 'entity_table' => array(
164 'name' => 'entity_table',
165 'type' => CRM_Utils_Type
::T_STRING
,
166 'title' => ts('Entity Table') ,
167 'description' => 'name of the entity table for the above id, e.g. civicrm_activity, civicrm_participant',
169 'size' => CRM_Utils_Type
::HUGE
,
171 'action_schedule_id' => array(
172 'name' => 'action_schedule_id',
173 'type' => CRM_Utils_Type
::T_INT
,
174 'title' => ts('Schedule') ,
175 'description' => 'FK to the action schedule that this action originated from.',
177 'FKClassName' => 'CRM_Core_DAO_ActionSchedule',
179 'action_date_time' => array(
180 'name' => 'action_date_time',
181 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
182 'title' => ts('Action Date And Time') ,
183 'description' => 'date time that the action was performed on.',
186 'name' => 'is_error',
187 'type' => CRM_Utils_Type
::T_BOOLEAN
,
188 'title' => ts('Error?') ,
189 'description' => 'Was there any error sending the reminder?',
193 'type' => CRM_Utils_Type
::T_TEXT
,
194 'title' => ts('Message') ,
195 'description' => 'Description / text in case there was an error encountered.',
197 'repetition_number' => array(
198 'name' => 'repetition_number',
199 'type' => CRM_Utils_Type
::T_INT
,
200 'title' => ts('Repetition Number') ,
201 'description' => 'Keeps track of the sequence number of this repetition.',
203 'reference_date' => array(
204 'name' => 'reference_date',
205 'type' => CRM_Utils_Type
::T_DATE
,
206 'title' => ts('Reference Date') ,
207 'description' => 'Stores the date from the entity which triggered this reminder action (e.g. membership.end_date for most membership renewal reminders)',
211 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
213 return Civi
::$statics[__CLASS__
]['fields'];
216 * Return a mapping from field-name to the corresponding key (as used in fields()).
219 * Array(string $name => string $uniqueName).
221 static function &fieldKeys() {
222 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
223 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
225 return Civi
::$statics[__CLASS__
]['fieldKeys'];
228 * Returns the names of this table
232 static function getTableName() {
233 return self
::$_tableName;
236 * Returns if this table needs to be logged
244 * Returns the list of fields that can be imported
246 * @param bool $prefix
250 static function &import($prefix = false) {
251 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'action_log', $prefix, array());
255 * Returns the list of fields that can be exported
257 * @param bool $prefix
261 static function &export($prefix = false) {
262 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'action_log', $prefix, array());