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:9176ce7b1312c05e06b2d744da945f83)
13 * Database access object for the RecurringEntity entity.
15 class CRM_Core_DAO_RecurringEntity
extends CRM_Core_DAO
{
16 const EXT
= 'civicrm';
17 const TABLE_ADDED
= '4.6';
20 * Static instance to hold the table name.
24 public static $_tableName = 'civicrm_recurring_entity';
27 * Should CiviCRM log any modifications to this table in the civicrm_log table.
31 public static $_log = TRUE;
39 * Recurring Entity Parent ID
46 * Recurring Entity Child ID
53 * Physical tablename for entity, e.g. civicrm_event
60 * 1-this entity, 2-this and the following entities, 3-all the entities
69 public function __construct() {
70 $this->__table
= 'civicrm_recurring_entity';
71 parent
::__construct();
75 * Returns localized title of this entity.
78 * Whether to return the plural version of the title.
80 public static function getEntityTitle($plural = FALSE) {
81 return $plural ?
ts('Recurring Entities') : ts('Recurring Entity');
85 * Returns all the column names of this table
89 public static function &fields() {
90 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
91 Civi
::$statics[__CLASS__
]['fields'] = [
94 'type' => CRM_Utils_Type
::T_INT
,
97 'where' => 'civicrm_recurring_entity.id',
98 'table_name' => 'civicrm_recurring_entity',
99 'entity' => 'RecurringEntity',
100 'bao' => 'CRM_Core_BAO_RecurringEntity',
109 'name' => 'parent_id',
110 'type' => CRM_Utils_Type
::T_INT
,
111 'title' => ts('Parent ID'),
112 'description' => ts('Recurring Entity Parent ID'),
114 'where' => 'civicrm_recurring_entity.parent_id',
115 'table_name' => 'civicrm_recurring_entity',
116 'entity' => 'RecurringEntity',
117 'bao' => 'CRM_Core_BAO_RecurringEntity',
122 'name' => 'entity_id',
123 'type' => CRM_Utils_Type
::T_INT
,
124 'title' => ts('Entity ID'),
125 'description' => ts('Recurring Entity Child ID'),
126 'where' => 'civicrm_recurring_entity.entity_id',
127 'table_name' => 'civicrm_recurring_entity',
128 'entity' => 'RecurringEntity',
129 'bao' => 'CRM_Core_BAO_RecurringEntity',
134 'name' => 'entity_table',
135 'type' => CRM_Utils_Type
::T_STRING
,
136 'title' => ts('Entity Table'),
137 'description' => ts('Physical tablename for entity, e.g. civicrm_event'),
140 'size' => CRM_Utils_Type
::BIG
,
141 'where' => 'civicrm_recurring_entity.entity_table',
142 'table_name' => 'civicrm_recurring_entity',
143 'entity' => 'RecurringEntity',
144 'bao' => 'CRM_Core_BAO_RecurringEntity',
150 'type' => CRM_Utils_Type
::T_BOOLEAN
,
151 'title' => ts('Cascade Type'),
152 'description' => ts('1-this entity, 2-this and the following entities, 3-all the entities'),
154 'where' => 'civicrm_recurring_entity.mode',
156 'table_name' => 'civicrm_recurring_entity',
157 'entity' => 'RecurringEntity',
158 'bao' => 'CRM_Core_BAO_RecurringEntity',
163 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
165 return Civi
::$statics[__CLASS__
]['fields'];
169 * Return a mapping from field-name to the corresponding key (as used in fields()).
172 * Array(string $name => string $uniqueName).
174 public static function &fieldKeys() {
175 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
176 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
178 return Civi
::$statics[__CLASS__
]['fieldKeys'];
182 * Returns the names of this table
186 public static function getTableName() {
187 return self
::$_tableName;
191 * Returns if this table needs to be logged
195 public function getLog() {
200 * Returns the list of fields that can be imported
202 * @param bool $prefix
206 public static function &import($prefix = FALSE) {
207 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'recurring_entity', $prefix, []);
212 * Returns the list of fields that can be exported
214 * @param bool $prefix
218 public static function &export($prefix = FALSE) {
219 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'recurring_entity', $prefix, []);
224 * Returns the list of indices
226 * @param bool $localize
230 public static function indices($localize = TRUE) {
232 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;