3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.7 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2017 |
7 +--------------------------------------------------------------------+
8 | This file is a part of CiviCRM. |
10 | CiviCRM is free software; you can copy, modify, and distribute it |
11 | under the terms of the GNU Affero General Public License |
12 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
14 | CiviCRM is distributed in the hope that it will be useful, but |
15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
17 | See the GNU Affero General Public License for more details. |
19 | You should have received a copy of the GNU Affero General Public |
20 | License and the CiviCRM Licensing Exception along |
21 | with this program; if not, contact CiviCRM LLC |
22 | at info[AT]civicrm[DOT]org. If you have questions about the |
23 | GNU Affero General Public License or the licensing of CiviCRM, |
24 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
25 +--------------------------------------------------------------------+
29 * @copyright CiviCRM LLC (c) 2004-2017
31 * Generated from xml/schema/CRM/ACL/ACL.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:64a0037ac9582a2b613798886028013e)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
38 * CRM_ACL_DAO_ACL constructor.
40 class CRM_ACL_DAO_ACL
extends CRM_Core_DAO
{
42 * Static instance to hold the table name.
46 static $_tableName = 'civicrm_acl';
48 * Should CiviCRM log any modifications to this table in the civicrm_log table.
66 * Is this ACL entry Allow (0) or Deny (1) ?
72 * Table of the object possessing this ACL entry (Contact, Group, or ACL Group)
78 * ID of the object possessing this ACL
84 * What operation does this ACL entry control?
90 * The table of the object controlled by this ACL entry
96 * The ID of the object controlled by this ACL entry
102 * If this is a grant/revoke entry, what table are we granting?
108 * ID of the ACL or ACL group being granted/revoked
114 * Is this property active?
122 function __construct() {
123 $this->__table
= 'civicrm_acl';
124 parent
::__construct();
127 * Returns foreign keys and entity references.
130 * [CRM_Core_Reference_Interface]
132 static function getReferenceColumns() {
133 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
134 Civi
::$statics[__CLASS__
]['links'] = static ::createReferenceColumns(__CLASS__
);
135 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Dynamic(self
::getTableName() , 'entity_id', NULL, 'id', 'entity_table');
136 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
138 return Civi
::$statics[__CLASS__
]['links'];
141 * Returns all the column names of this table
145 static function &fields() {
146 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
147 Civi
::$statics[__CLASS__
]['fields'] = array(
150 'type' => CRM_Utils_Type
::T_INT
,
151 'title' => ts('ACL ID') ,
152 'description' => 'Unique table ID',
154 'table_name' => 'civicrm_acl',
156 'bao' => 'CRM_ACL_BAO_ACL',
160 'type' => CRM_Utils_Type
::T_STRING
,
161 'title' => ts('ACL Name') ,
162 'description' => 'ACL Name.',
164 'size' => CRM_Utils_Type
::BIG
,
165 'table_name' => 'civicrm_acl',
167 'bao' => 'CRM_ACL_BAO_ACL',
174 'type' => CRM_Utils_Type
::T_BOOLEAN
,
175 'title' => ts('Deny ACL?') ,
176 'description' => 'Is this ACL entry Allow (0) or Deny (1) ?',
178 'table_name' => 'civicrm_acl',
180 'bao' => 'CRM_ACL_BAO_ACL',
185 'entity_table' => array(
186 'name' => 'entity_table',
187 'type' => CRM_Utils_Type
::T_STRING
,
188 'title' => ts('ACL Entity') ,
189 'description' => 'Table of the object possessing this ACL entry (Contact, Group, or ACL Group)',
192 'size' => CRM_Utils_Type
::BIG
,
193 'table_name' => 'civicrm_acl',
195 'bao' => 'CRM_ACL_BAO_ACL',
197 'entity_id' => array(
198 'name' => 'entity_id',
199 'type' => CRM_Utils_Type
::T_INT
,
200 'title' => ts('Entity ID') ,
201 'description' => 'ID of the object possessing this ACL',
202 'table_name' => 'civicrm_acl',
204 'bao' => 'CRM_ACL_BAO_ACL',
206 'operation' => array(
207 'name' => 'operation',
208 'type' => CRM_Utils_Type
::T_STRING
,
209 'title' => ts('ACL Operation') ,
210 'description' => 'What operation does this ACL entry control?',
213 'size' => CRM_Utils_Type
::EIGHT
,
214 'table_name' => 'civicrm_acl',
216 'bao' => 'CRM_ACL_BAO_ACL',
220 'pseudoconstant' => array(
221 'callback' => 'CRM_ACL_BAO_ACL::operation',
224 'object_table' => array(
225 'name' => 'object_table',
226 'type' => CRM_Utils_Type
::T_STRING
,
227 'title' => ts('ACL Object') ,
228 'description' => 'The table of the object controlled by this ACL entry',
230 'size' => CRM_Utils_Type
::BIG
,
231 'table_name' => 'civicrm_acl',
233 'bao' => 'CRM_ACL_BAO_ACL',
235 'object_id' => array(
236 'name' => 'object_id',
237 'type' => CRM_Utils_Type
::T_INT
,
238 'title' => ts('ACL Object ID') ,
239 'description' => 'The ID of the object controlled by this ACL entry',
240 'table_name' => 'civicrm_acl',
242 'bao' => 'CRM_ACL_BAO_ACL',
244 'acl_table' => array(
245 'name' => 'acl_table',
246 'type' => CRM_Utils_Type
::T_STRING
,
247 'title' => ts('ACL Table') ,
248 'description' => 'If this is a grant/revoke entry, what table are we granting?',
250 'size' => CRM_Utils_Type
::BIG
,
251 'table_name' => 'civicrm_acl',
253 'bao' => 'CRM_ACL_BAO_ACL',
257 'type' => CRM_Utils_Type
::T_INT
,
258 'title' => ts('ACL Group ID') ,
259 'description' => 'ID of the ACL or ACL group being granted/revoked',
260 'table_name' => 'civicrm_acl',
262 'bao' => 'CRM_ACL_BAO_ACL',
264 'is_active' => array(
265 'name' => 'is_active',
266 'type' => CRM_Utils_Type
::T_BOOLEAN
,
267 'title' => ts('ACL Is Active?') ,
268 'description' => 'Is this property active?',
269 'table_name' => 'civicrm_acl',
271 'bao' => 'CRM_ACL_BAO_ACL',
273 'type' => 'Checkbox',
277 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
279 return Civi
::$statics[__CLASS__
]['fields'];
282 * Return a mapping from field-name to the corresponding key (as used in fields()).
285 * Array(string $name => string $uniqueName).
287 static function &fieldKeys() {
288 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
289 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
291 return Civi
::$statics[__CLASS__
]['fieldKeys'];
294 * Returns the names of this table
298 static function getTableName() {
299 return self
::$_tableName;
302 * Returns if this table needs to be logged
310 * Returns the list of fields that can be imported
312 * @param bool $prefix
316 static function &import($prefix = false) {
317 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'acl', $prefix, array());
321 * Returns the list of fields that can be exported
323 * @param bool $prefix
327 static function &export($prefix = false) {
328 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'acl', $prefix, array());