5 * @copyright CiviCRM LLC (c) 2004-2018
7 * Generated from xml/schema/CRM/Core/RecurringEntity.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
9 * (GenCodeChecksum:810f5bce8bb650c96703532242f254e8)
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 static $_tableName = 'civicrm_recurring_entity';
25 * Should CiviCRM log any modifications to this table in the civicrm_log table.
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 'table_name' => 'civicrm_recurring_entity',
86 'entity' => 'RecurringEntity',
87 'bao' => 'CRM_Core_BAO_RecurringEntity',
91 'name' => 'parent_id',
92 'type' => CRM_Utils_Type
::T_INT
,
93 'title' => ts('Parent ID'),
94 'description' => ts('Recurring Entity Parent ID'),
96 'table_name' => 'civicrm_recurring_entity',
97 'entity' => 'RecurringEntity',
98 'bao' => 'CRM_Core_BAO_RecurringEntity',
102 'name' => 'entity_id',
103 'type' => CRM_Utils_Type
::T_INT
,
104 'title' => ts('Entity ID'),
105 'description' => ts('Recurring Entity Child ID'),
106 'table_name' => 'civicrm_recurring_entity',
107 'entity' => 'RecurringEntity',
108 'bao' => 'CRM_Core_BAO_RecurringEntity',
112 'name' => 'entity_table',
113 'type' => CRM_Utils_Type
::T_STRING
,
114 'title' => ts('Entity Table'),
115 'description' => ts('Physical tablename for entity, e.g. civicrm_event'),
118 'size' => CRM_Utils_Type
::BIG
,
119 'table_name' => 'civicrm_recurring_entity',
120 'entity' => 'RecurringEntity',
121 'bao' => 'CRM_Core_BAO_RecurringEntity',
126 'type' => CRM_Utils_Type
::T_BOOLEAN
,
127 'title' => ts('Cascade Type'),
128 'description' => ts('1-this entity, 2-this and the following entities, 3-all the entities'),
131 'table_name' => 'civicrm_recurring_entity',
132 'entity' => 'RecurringEntity',
133 'bao' => 'CRM_Core_BAO_RecurringEntity',
137 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
139 return Civi
::$statics[__CLASS__
]['fields'];
143 * Return a mapping from field-name to the corresponding key (as used in fields()).
146 * Array(string $name => string $uniqueName).
148 public static function &fieldKeys() {
149 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
150 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
152 return Civi
::$statics[__CLASS__
]['fieldKeys'];
156 * Returns the names of this table
160 public static function getTableName() {
161 return self
::$_tableName;
165 * Returns if this table needs to be logged
169 public function getLog() {
174 * Returns the list of fields that can be imported
176 * @param bool $prefix
180 public static function &import($prefix = FALSE) {
181 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'recurring_entity', $prefix, []);
186 * Returns the list of fields that can be exported
188 * @param bool $prefix
192 public static function &export($prefix = FALSE) {
193 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'recurring_entity', $prefix, []);
198 * Returns the list of indices
200 * @param bool $localize
204 public static function indices($localize = TRUE) {
206 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;