5 * @copyright CiviCRM LLC https://civicrm.org/licensing
7 * Generated from xml/schema/CRM/ACL/ACLCache.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
9 * (GenCodeChecksum:0427e4f02009f7a66cf34ae18ef397aa)
13 * Database access object for the ACLCache entity.
15 class CRM_ACL_DAO_ACLCache
extends CRM_Core_DAO
{
18 * Static instance to hold the table name.
22 public static $_tableName = 'civicrm_acl_cache';
25 * Should CiviCRM log any modifications to this table in the civicrm_log table.
29 public static $_log = FALSE;
39 * Foreign Key to Contact
53 * When was this cache entry last modified
57 public $modified_date;
62 public function __construct() {
63 $this->__table
= 'civicrm_acl_cache';
64 parent
::__construct();
68 * Returns localized title of this entity.
70 public static function getEntityTitle() {
71 return ts('ACLCaches');
75 * Returns foreign keys and entity references.
78 * [CRM_Core_Reference_Interface]
80 public static function getReferenceColumns() {
81 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
82 Civi
::$statics[__CLASS__
]['links'] = static::createReferenceColumns(__CLASS__
);
83 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'contact_id', 'civicrm_contact', 'id');
84 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'acl_id', 'civicrm_acl', 'id');
85 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
87 return Civi
::$statics[__CLASS__
]['links'];
91 * Returns all the column names of this table
95 public static function &fields() {
96 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
97 Civi
::$statics[__CLASS__
]['fields'] = [
100 'type' => CRM_Utils_Type
::T_INT
,
101 'title' => ts('Cache ID'),
102 'description' => ts('Unique table ID'),
104 'where' => 'civicrm_acl_cache.id',
105 'table_name' => 'civicrm_acl_cache',
106 'entity' => 'ACLCache',
107 'bao' => 'CRM_ACL_DAO_ACLCache',
112 'name' => 'contact_id',
113 'type' => CRM_Utils_Type
::T_INT
,
114 'title' => ts('Cache Contact'),
115 'description' => ts('Foreign Key to Contact'),
116 'where' => 'civicrm_acl_cache.contact_id',
117 'table_name' => 'civicrm_acl_cache',
118 'entity' => 'ACLCache',
119 'bao' => 'CRM_ACL_DAO_ACLCache',
121 'FKClassName' => 'CRM_Contact_DAO_Contact',
123 'type' => 'EntityRef',
129 'type' => CRM_Utils_Type
::T_INT
,
130 'title' => ts('Cache ACL'),
131 'description' => ts('Foreign Key to ACL'),
133 'where' => 'civicrm_acl_cache.acl_id',
134 'table_name' => 'civicrm_acl_cache',
135 'entity' => 'ACLCache',
136 'bao' => 'CRM_ACL_DAO_ACLCache',
138 'FKClassName' => 'CRM_ACL_DAO_ACL',
139 'pseudoconstant' => [
140 'table' => 'civicrm_acl',
142 'labelColumn' => 'name',
147 'name' => 'modified_date',
148 'type' => CRM_Utils_Type
::T_TIMESTAMP
,
149 'title' => ts('Cache Modified Date'),
150 'description' => ts('When was this cache entry last modified'),
152 'where' => 'civicrm_acl_cache.modified_date',
153 'table_name' => 'civicrm_acl_cache',
154 'entity' => 'ACLCache',
155 'bao' => 'CRM_ACL_DAO_ACLCache',
160 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
162 return Civi
::$statics[__CLASS__
]['fields'];
166 * Return a mapping from field-name to the corresponding key (as used in fields()).
169 * Array(string $name => string $uniqueName).
171 public static function &fieldKeys() {
172 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
173 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
175 return Civi
::$statics[__CLASS__
]['fieldKeys'];
179 * Returns the names of this table
183 public static function getTableName() {
184 return self
::$_tableName;
188 * Returns if this table needs to be logged
192 public function getLog() {
197 * Returns the list of fields that can be imported
199 * @param bool $prefix
203 public static function &import($prefix = FALSE) {
204 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'acl_cache', $prefix, []);
209 * Returns the list of fields that can be exported
211 * @param bool $prefix
215 public static function &export($prefix = FALSE) {
216 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'acl_cache', $prefix, []);
221 * Returns the list of indices
223 * @param bool $localize
227 public static function indices($localize = TRUE) {
230 'name' => 'index_acl_id',
234 'localizable' => FALSE,
235 'sig' => 'civicrm_acl_cache::0::acl_id',
237 'index_modified_date' => [
238 'name' => 'index_modified_date',
240 0 => 'modified_date',
242 'localizable' => FALSE,
243 'sig' => 'civicrm_acl_cache::0::modified_date',
246 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;