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:ca99bbbd188d9c890d47e35c1b0b3bbd)
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',
111 'name' => 'contact_id',
112 'type' => CRM_Utils_Type
::T_INT
,
113 'title' => ts('Cache Contact'),
114 'description' => ts('Foreign Key to Contact'),
115 'where' => 'civicrm_acl_cache.contact_id',
116 'table_name' => 'civicrm_acl_cache',
117 'entity' => 'ACLCache',
118 'bao' => 'CRM_ACL_DAO_ACLCache',
120 'FKClassName' => 'CRM_Contact_DAO_Contact',
122 'type' => 'EntityRef',
127 'type' => CRM_Utils_Type
::T_INT
,
128 'title' => ts('Cache ACL'),
129 'description' => ts('Foreign Key to ACL'),
131 'where' => 'civicrm_acl_cache.acl_id',
132 'table_name' => 'civicrm_acl_cache',
133 'entity' => 'ACLCache',
134 'bao' => 'CRM_ACL_DAO_ACLCache',
136 'FKClassName' => 'CRM_ACL_DAO_ACL',
137 'pseudoconstant' => [
138 'table' => 'civicrm_acl',
140 'labelColumn' => 'name',
144 'name' => 'modified_date',
145 'type' => CRM_Utils_Type
::T_TIMESTAMP
,
146 'title' => ts('Cache Modified Date'),
147 'description' => ts('When was this cache entry last modified'),
149 'where' => 'civicrm_acl_cache.modified_date',
150 'table_name' => 'civicrm_acl_cache',
151 'entity' => 'ACLCache',
152 'bao' => 'CRM_ACL_DAO_ACLCache',
156 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
158 return Civi
::$statics[__CLASS__
]['fields'];
162 * Return a mapping from field-name to the corresponding key (as used in fields()).
165 * Array(string $name => string $uniqueName).
167 public static function &fieldKeys() {
168 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
169 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
171 return Civi
::$statics[__CLASS__
]['fieldKeys'];
175 * Returns the names of this table
179 public static function getTableName() {
180 return self
::$_tableName;
184 * Returns if this table needs to be logged
188 public function getLog() {
193 * Returns the list of fields that can be imported
195 * @param bool $prefix
199 public static function &import($prefix = FALSE) {
200 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'acl_cache', $prefix, []);
205 * Returns the list of fields that can be exported
207 * @param bool $prefix
211 public static function &export($prefix = FALSE) {
212 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'acl_cache', $prefix, []);
217 * Returns the list of indices
219 * @param bool $localize
223 public static function indices($localize = TRUE) {
226 'name' => 'index_acl_id',
230 'localizable' => FALSE,
231 'sig' => 'civicrm_acl_cache::0::acl_id',
233 'index_modified_date' => [
234 'name' => 'index_modified_date',
236 0 => 'modified_date',
238 'localizable' => FALSE,
239 'sig' => 'civicrm_acl_cache::0::modified_date',
242 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;