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/Core/Navigation.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:28492fb431c3874453b53d0af4e3834a)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
37 class CRM_Core_DAO_Navigation
extends CRM_Core_DAO
{
39 * static instance to hold the table name
43 static $_tableName = 'civicrm_navigation';
45 * static instance to hold the field values
49 static $_fields = null;
51 * static instance to hold the keys used in $_fields for each field.
55 static $_fieldKeys = null;
57 * static instance to hold the FK relationships
61 static $_links = null;
63 * static value to see if we should log any modifications to
64 * this table in the civicrm_log table
75 * Which Domain is this navigation item for
93 * url in case of custom navigation link
99 * Permission for menu item
105 * Permission Operator
109 public $permission_operator;
111 * Parent navigation item, used for grouping
117 * Is this navigation item active?
123 * If separator needs to be added after this menu item
127 public $has_separator;
129 * Ordering of the navigation items in various blocks.
137 * @return civicrm_navigation
139 function __construct() {
140 $this->__table
= 'civicrm_navigation';
141 parent
::__construct();
144 * Returns foreign keys and entity references
147 * [CRM_Core_Reference_Interface]
149 static function getReferenceColumns() {
150 if (!self
::$_links) {
151 self
::$_links = static ::createReferenceColumns(__CLASS__
);
152 self
::$_links[] = new CRM_Core_Reference_Basic(self
::getTableName() , 'domain_id', 'civicrm_domain', 'id');
153 self
::$_links[] = new CRM_Core_Reference_Basic(self
::getTableName() , 'parent_id', 'civicrm_navigation', 'id');
155 return self
::$_links;
158 * Returns all the column names of this table
162 static function &fields() {
163 if (!(self
::$_fields)) {
164 self
::$_fields = array(
167 'type' => CRM_Utils_Type
::T_INT
,
168 'title' => ts('Navigation ID') ,
171 'domain_id' => array(
172 'name' => 'domain_id',
173 'type' => CRM_Utils_Type
::T_INT
,
174 'title' => ts('Navigation Domain') ,
175 'description' => 'Which Domain is this navigation item for',
177 'FKClassName' => 'CRM_Core_DAO_Domain',
178 'pseudoconstant' => array(
179 'table' => 'civicrm_domain',
181 'labelColumn' => 'name',
186 'type' => CRM_Utils_Type
::T_STRING
,
187 'title' => ts('Navigation Item Label') ,
188 'description' => 'Navigation Title',
190 'size' => CRM_Utils_Type
::HUGE
,
194 'type' => CRM_Utils_Type
::T_STRING
,
195 'title' => ts('Navigation Item Machine Name') ,
196 'description' => 'Internal Name',
198 'size' => CRM_Utils_Type
::HUGE
,
202 'type' => CRM_Utils_Type
::T_STRING
,
203 'title' => ts('Url') ,
204 'description' => 'url in case of custom navigation link',
206 'size' => CRM_Utils_Type
::HUGE
,
208 'permission' => array(
209 'name' => 'permission',
210 'type' => CRM_Utils_Type
::T_STRING
,
211 'title' => ts('Required Permission') ,
212 'description' => 'Permission for menu item',
214 'size' => CRM_Utils_Type
::HUGE
,
216 'permission_operator' => array(
217 'name' => 'permission_operator',
218 'type' => CRM_Utils_Type
::T_STRING
,
219 'title' => ts('Permission Operator') ,
220 'description' => 'Permission Operator',
222 'size' => CRM_Utils_Type
::FOUR
,
224 'parent_id' => array(
225 'name' => 'parent_id',
226 'type' => CRM_Utils_Type
::T_INT
,
227 'title' => ts('Navigation parent ID') ,
228 'description' => 'Parent navigation item, used for grouping',
229 'FKClassName' => 'CRM_Core_DAO_Navigation',
230 'pseudoconstant' => array(
231 'table' => 'civicrm_navigation',
232 'keyColumn' => 'name',
233 'labelColumn' => 'label',
236 'is_active' => array(
237 'name' => 'is_active',
238 'type' => CRM_Utils_Type
::T_BOOLEAN
,
239 'title' => ts('Is Active') ,
240 'description' => 'Is this navigation item active?',
242 'has_separator' => array(
243 'name' => 'has_separator',
244 'type' => CRM_Utils_Type
::T_BOOLEAN
,
245 'title' => ts('Use separator') ,
246 'description' => 'If separator needs to be added after this menu item',
250 'type' => CRM_Utils_Type
::T_INT
,
251 'title' => ts('Order') ,
252 'description' => 'Ordering of the navigation items in various blocks.',
256 return self
::$_fields;
259 * Returns an array containing, for each field, the arary key used for that
260 * field in self::$_fields.
264 static function &fieldKeys() {
265 if (!(self
::$_fieldKeys)) {
266 self
::$_fieldKeys = array(
268 'domain_id' => 'domain_id',
272 'permission' => 'permission',
273 'permission_operator' => 'permission_operator',
274 'parent_id' => 'parent_id',
275 'is_active' => 'is_active',
276 'has_separator' => 'has_separator',
277 'weight' => 'weight',
280 return self
::$_fieldKeys;
283 * Returns the names of this table
287 static function getTableName() {
288 return self
::$_tableName;
291 * Returns if this table needs to be logged
299 * Returns the list of fields that can be imported
301 * @param bool $prefix
305 static function &import($prefix = false) {
306 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'navigation', $prefix, array());
310 * Returns the list of fields that can be exported
312 * @param bool $prefix
316 static function &export($prefix = false) {
317 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'navigation', $prefix, array());