5 * @copyright CiviCRM LLC (c) 2004-2019
7 * Generated from xml/schema/CRM/Core/RecurringEntity.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
9 * (GenCodeChecksum:9e730db130a597de8528532d06f2ad54)
13 * Database access object for the RecurringEntity entity.
15 class CRM_Core_DAO_RecurringEntity
extends CRM_Core_DAO
{
18 * Static instance to hold the table name.
22 public static $_tableName = 'civicrm_recurring_entity';
25 * Should CiviCRM log any modifications to this table in the civicrm_log table.
29 public static $_log = TRUE;
37 * Recurring Entity Parent ID
44 * Recurring Entity Child ID
51 * Physical tablename for entity, e.g. civicrm_event
58 * 1-this entity, 2-this and the following entities, 3-all the entities
67 public function __construct() {
68 $this->__table
= 'civicrm_recurring_entity';
69 parent
::__construct();
73 * Returns all the column names of this table
77 public static function &fields() {
78 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
79 Civi
::$statics[__CLASS__
]['fields'] = [
82 'type' => CRM_Utils_Type
::T_INT
,
85 'where' => 'civicrm_recurring_entity.id',
86 'table_name' => 'civicrm_recurring_entity',
87 'entity' => 'RecurringEntity',
88 'bao' => 'CRM_Core_BAO_RecurringEntity',
92 'name' => 'parent_id',
93 'type' => CRM_Utils_Type
::T_INT
,
94 'title' => ts('Parent ID'),
95 'description' => ts('Recurring Entity Parent ID'),
97 'where' => 'civicrm_recurring_entity.parent_id',
98 'table_name' => 'civicrm_recurring_entity',
99 'entity' => 'RecurringEntity',
100 'bao' => 'CRM_Core_BAO_RecurringEntity',
104 'name' => 'entity_id',
105 'type' => CRM_Utils_Type
::T_INT
,
106 'title' => ts('Entity ID'),
107 'description' => ts('Recurring Entity Child ID'),
108 'where' => 'civicrm_recurring_entity.entity_id',
109 'table_name' => 'civicrm_recurring_entity',
110 'entity' => 'RecurringEntity',
111 'bao' => 'CRM_Core_BAO_RecurringEntity',
115 'name' => 'entity_table',
116 'type' => CRM_Utils_Type
::T_STRING
,
117 'title' => ts('Entity Table'),
118 'description' => ts('Physical tablename for entity, e.g. civicrm_event'),
121 'size' => CRM_Utils_Type
::BIG
,
122 'where' => 'civicrm_recurring_entity.entity_table',
123 'table_name' => 'civicrm_recurring_entity',
124 'entity' => 'RecurringEntity',
125 'bao' => 'CRM_Core_BAO_RecurringEntity',
130 'type' => CRM_Utils_Type
::T_BOOLEAN
,
131 'title' => ts('Cascade Type'),
132 'description' => ts('1-this entity, 2-this and the following entities, 3-all the entities'),
134 'where' => 'civicrm_recurring_entity.mode',
136 'table_name' => 'civicrm_recurring_entity',
137 'entity' => 'RecurringEntity',
138 'bao' => 'CRM_Core_BAO_RecurringEntity',
142 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
144 return Civi
::$statics[__CLASS__
]['fields'];
148 * Return a mapping from field-name to the corresponding key (as used in fields()).
151 * Array(string $name => string $uniqueName).
153 public static function &fieldKeys() {
154 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
155 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
157 return Civi
::$statics[__CLASS__
]['fieldKeys'];
161 * Returns the names of this table
165 public static function getTableName() {
166 return self
::$_tableName;
170 * Returns if this table needs to be logged
174 public function getLog() {
179 * Returns the list of fields that can be imported
181 * @param bool $prefix
185 public static function &import($prefix = FALSE) {
186 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'recurring_entity', $prefix, []);
191 * Returns the list of fields that can be exported
193 * @param bool $prefix
197 public static function &export($prefix = FALSE) {
198 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'recurring_entity', $prefix, []);
203 * Returns the list of indices
205 * @param bool $localize
209 public static function indices($localize = TRUE) {
211 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;