5 * @copyright CiviCRM LLC https://civicrm.org/licensing
7 * Generated from xml/schema/CRM/Core/RecurringEntity.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
9 * (GenCodeChecksum:6321192add109bdc0211b72cc49e3611)
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 localized title of this entity.
75 public static function getEntityTitle() {
76 return ts('Recurring Entities');
80 * Returns all the column names of this table
84 public static function &fields() {
85 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
86 Civi
::$statics[__CLASS__
]['fields'] = [
89 'type' => CRM_Utils_Type
::T_INT
,
92 'where' => 'civicrm_recurring_entity.id',
93 'table_name' => 'civicrm_recurring_entity',
94 'entity' => 'RecurringEntity',
95 'bao' => 'CRM_Core_BAO_RecurringEntity',
99 'name' => 'parent_id',
100 'type' => CRM_Utils_Type
::T_INT
,
101 'title' => ts('Parent ID'),
102 'description' => ts('Recurring Entity Parent ID'),
104 'where' => 'civicrm_recurring_entity.parent_id',
105 'table_name' => 'civicrm_recurring_entity',
106 'entity' => 'RecurringEntity',
107 'bao' => 'CRM_Core_BAO_RecurringEntity',
111 'name' => 'entity_id',
112 'type' => CRM_Utils_Type
::T_INT
,
113 'title' => ts('Entity ID'),
114 'description' => ts('Recurring Entity Child ID'),
115 'where' => 'civicrm_recurring_entity.entity_id',
116 'table_name' => 'civicrm_recurring_entity',
117 'entity' => 'RecurringEntity',
118 'bao' => 'CRM_Core_BAO_RecurringEntity',
122 'name' => 'entity_table',
123 'type' => CRM_Utils_Type
::T_STRING
,
124 'title' => ts('Entity Table'),
125 'description' => ts('Physical tablename for entity, e.g. civicrm_event'),
128 'size' => CRM_Utils_Type
::BIG
,
129 'where' => 'civicrm_recurring_entity.entity_table',
130 'table_name' => 'civicrm_recurring_entity',
131 'entity' => 'RecurringEntity',
132 'bao' => 'CRM_Core_BAO_RecurringEntity',
137 'type' => CRM_Utils_Type
::T_BOOLEAN
,
138 'title' => ts('Cascade Type'),
139 'description' => ts('1-this entity, 2-this and the following entities, 3-all the entities'),
141 'where' => 'civicrm_recurring_entity.mode',
143 'table_name' => 'civicrm_recurring_entity',
144 'entity' => 'RecurringEntity',
145 'bao' => 'CRM_Core_BAO_RecurringEntity',
149 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
151 return Civi
::$statics[__CLASS__
]['fields'];
155 * Return a mapping from field-name to the corresponding key (as used in fields()).
158 * Array(string $name => string $uniqueName).
160 public static function &fieldKeys() {
161 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
162 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
164 return Civi
::$statics[__CLASS__
]['fieldKeys'];
168 * Returns the names of this table
172 public static function getTableName() {
173 return self
::$_tableName;
177 * Returns if this table needs to be logged
181 public function getLog() {
186 * Returns the list of fields that can be imported
188 * @param bool $prefix
192 public static function &import($prefix = FALSE) {
193 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'recurring_entity', $prefix, []);
198 * Returns the list of fields that can be exported
200 * @param bool $prefix
204 public static function &export($prefix = FALSE) {
205 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'recurring_entity', $prefix, []);
210 * Returns the list of indices
212 * @param bool $localize
216 public static function indices($localize = TRUE) {
218 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;