3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.7 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2016 |
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-2016
31 * Generated from xml/schema/CRM/ACL/ACL.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:5727b59234c51d62e5d279c582cbd95b)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
37 class CRM_ACL_DAO_ACL
extends CRM_Core_DAO
{
39 * static instance to hold the table name
43 static $_tableName = 'civicrm_acl';
45 * static value to see if we should log any modifications to
46 * this table in the civicrm_log table
64 * Is this ACL entry Allow (0) or Deny (1) ?
70 * Table of the object possessing this ACL entry (Contact, Group, or ACL Group)
76 * ID of the object possessing this ACL
82 * What operation does this ACL entry control?
88 * The table of the object controlled by this ACL entry
94 * The ID of the object controlled by this ACL entry
100 * If this is a grant/revoke entry, what table are we granting?
106 * ID of the ACL or ACL group being granted/revoked
112 * Is this property active?
120 * @return civicrm_acl
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',
157 'type' => CRM_Utils_Type
::T_STRING
,
158 'title' => ts('ACL Name') ,
159 'description' => 'ACL Name.',
161 'size' => CRM_Utils_Type
::BIG
,
168 'type' => CRM_Utils_Type
::T_BOOLEAN
,
169 'title' => ts('Deny ACL?') ,
170 'description' => 'Is this ACL entry Allow (0) or Deny (1) ?',
176 'entity_table' => array(
177 'name' => 'entity_table',
178 'type' => CRM_Utils_Type
::T_STRING
,
179 'title' => ts('ACL Entity') ,
180 'description' => 'Table of the object possessing this ACL entry (Contact, Group, or ACL Group)',
183 'size' => CRM_Utils_Type
::BIG
,
185 'entity_id' => array(
186 'name' => 'entity_id',
187 'type' => CRM_Utils_Type
::T_INT
,
188 'title' => ts('Entity ID') ,
189 'description' => 'ID of the object possessing this ACL',
191 'operation' => array(
192 'name' => 'operation',
193 'type' => CRM_Utils_Type
::T_STRING
,
194 'title' => ts('ACL Operation') ,
195 'description' => 'What operation does this ACL entry control?',
198 'size' => CRM_Utils_Type
::EIGHT
,
202 'pseudoconstant' => array(
203 'callback' => 'CRM_ACL_BAO_ACL::operation',
206 'object_table' => array(
207 'name' => 'object_table',
208 'type' => CRM_Utils_Type
::T_STRING
,
209 'title' => ts('ACL Object') ,
210 'description' => 'The table of the object controlled by this ACL entry',
212 'size' => CRM_Utils_Type
::BIG
,
214 'object_id' => array(
215 'name' => 'object_id',
216 'type' => CRM_Utils_Type
::T_INT
,
217 'title' => ts('ACL Object ID') ,
218 'description' => 'The ID of the object controlled by this ACL entry',
220 'acl_table' => array(
221 'name' => 'acl_table',
222 'type' => CRM_Utils_Type
::T_STRING
,
223 'title' => ts('ACL Table') ,
224 'description' => 'If this is a grant/revoke entry, what table are we granting?',
226 'size' => CRM_Utils_Type
::BIG
,
230 'type' => CRM_Utils_Type
::T_INT
,
231 'title' => ts('ACL Group ID') ,
232 'description' => 'ID of the ACL or ACL group being granted/revoked',
234 'is_active' => array(
235 'name' => 'is_active',
236 'type' => CRM_Utils_Type
::T_BOOLEAN
,
237 'title' => ts('ACL Is Active?') ,
238 'description' => 'Is this property active?',
240 'type' => 'Checkbox',
244 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
246 return Civi
::$statics[__CLASS__
]['fields'];
249 * Return a mapping from field-name to the corresponding key (as used in fields()).
252 * Array(string $name => string $uniqueName).
254 static function &fieldKeys() {
255 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
256 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
258 return Civi
::$statics[__CLASS__
]['fieldKeys'];
261 * Returns the names of this table
265 static function getTableName() {
266 return self
::$_tableName;
269 * Returns if this table needs to be logged
277 * Returns the list of fields that can be imported
279 * @param bool $prefix
283 static function &import($prefix = false) {
284 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'acl', $prefix, array());
288 * Returns the list of fields that can be exported
290 * @param bool $prefix
294 static function &export($prefix = false) {
295 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'acl', $prefix, array());