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:2667b60a5f917352d52964de09cf85fa)
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',
105 'name' => 'parent_id',
106 'type' => CRM_Utils_Type
::T_INT
,
107 'title' => ts('Parent ID'),
108 'description' => ts('Recurring Entity Parent ID'),
110 'where' => 'civicrm_recurring_entity.parent_id',
111 'table_name' => 'civicrm_recurring_entity',
112 'entity' => 'RecurringEntity',
113 'bao' => 'CRM_Core_BAO_RecurringEntity',
118 'name' => 'entity_id',
119 'type' => CRM_Utils_Type
::T_INT
,
120 'title' => ts('Entity ID'),
121 'description' => ts('Recurring Entity Child ID'),
122 'where' => 'civicrm_recurring_entity.entity_id',
123 'table_name' => 'civicrm_recurring_entity',
124 'entity' => 'RecurringEntity',
125 'bao' => 'CRM_Core_BAO_RecurringEntity',
130 'name' => 'entity_table',
131 'type' => CRM_Utils_Type
::T_STRING
,
132 'title' => ts('Entity Table'),
133 'description' => ts('Physical tablename for entity, e.g. civicrm_event'),
136 'size' => CRM_Utils_Type
::BIG
,
137 'where' => 'civicrm_recurring_entity.entity_table',
138 'table_name' => 'civicrm_recurring_entity',
139 'entity' => 'RecurringEntity',
140 'bao' => 'CRM_Core_BAO_RecurringEntity',
146 'type' => CRM_Utils_Type
::T_BOOLEAN
,
147 'title' => ts('Cascade Type'),
148 'description' => ts('1-this entity, 2-this and the following entities, 3-all the entities'),
150 'where' => 'civicrm_recurring_entity.mode',
152 'table_name' => 'civicrm_recurring_entity',
153 'entity' => 'RecurringEntity',
154 'bao' => 'CRM_Core_BAO_RecurringEntity',
159 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
161 return Civi
::$statics[__CLASS__
]['fields'];
165 * Return a mapping from field-name to the corresponding key (as used in fields()).
168 * Array(string $name => string $uniqueName).
170 public static function &fieldKeys() {
171 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
172 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
174 return Civi
::$statics[__CLASS__
]['fieldKeys'];
178 * Returns the names of this table
182 public static function getTableName() {
183 return self
::$_tableName;
187 * Returns if this table needs to be logged
191 public function getLog() {
196 * Returns the list of fields that can be imported
198 * @param bool $prefix
202 public static function &import($prefix = FALSE) {
203 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'recurring_entity', $prefix, []);
208 * Returns the list of fields that can be exported
210 * @param bool $prefix
214 public static function &export($prefix = FALSE) {
215 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'recurring_entity', $prefix, []);
220 * Returns the list of indices
222 * @param bool $localize
226 public static function indices($localize = TRUE) {
228 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;