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/Menu.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:cde2f8bb660dfd2d166e6a3a6c231178)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
37 class CRM_Core_DAO_Menu
extends CRM_Core_DAO
{
39 * static instance to hold the table name
43 static $_tableName = 'civicrm_menu';
45 * static value to see if we should log any modifications to
46 * this table in the civicrm_log table
57 * Which Domain is this menu item for
69 * Arguments to pass to the url
73 public $path_arguments;
80 * Function to call to check access permissions
84 public $access_callback;
86 * Arguments to pass to access callback
90 public $access_arguments;
92 * function to call for this url
96 public $page_callback;
98 * Arguments to pass to page callback
102 public $page_arguments;
104 * Breadcrumb for the path.
110 * Url where a page should redirected to, if next url not known.
116 * Arguments to pass to return_url
120 public $return_url_args;
122 * Component that this menu item belongs to
126 public $component_id;
128 * Is this menu item active?
134 * Is this menu accessible to the public?
140 * Is this menu exposed to the navigation system?
146 * Should this menu be exposed via SSL if enabled?
152 * Ordering of the menu items in various blocks.
170 * skip this url being exposed to breadcrumb
174 public $skipBreadcrumb;
178 * @return civicrm_menu
180 function __construct() {
181 $this->__table
= 'civicrm_menu';
182 parent
::__construct();
185 * Returns foreign keys and entity references
188 * [CRM_Core_Reference_Interface]
190 static function getReferenceColumns() {
191 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
192 Civi
::$statics[__CLASS__
]['links'] = static ::createReferenceColumns(__CLASS__
);
193 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName() , 'domain_id', 'civicrm_domain', 'id');
194 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName() , 'component_id', 'civicrm_component', 'id');
195 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
197 return Civi
::$statics[__CLASS__
]['links'];
200 * Returns all the column names of this table
204 static function &fields() {
205 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
206 Civi
::$statics[__CLASS__
]['fields'] = array(
209 'type' => CRM_Utils_Type
::T_INT
,
210 'title' => ts('Menu ID') ,
213 'domain_id' => array(
214 'name' => 'domain_id',
215 'type' => CRM_Utils_Type
::T_INT
,
216 'title' => ts('Domain') ,
217 'description' => 'Which Domain is this menu item for',
219 'FKClassName' => 'CRM_Core_DAO_Domain',
220 'pseudoconstant' => array(
221 'table' => 'civicrm_domain',
223 'labelColumn' => 'name',
228 'type' => CRM_Utils_Type
::T_STRING
,
229 'title' => ts('Path') ,
230 'description' => 'Path Name',
232 'size' => CRM_Utils_Type
::HUGE
,
234 'path_arguments' => array(
235 'name' => 'path_arguments',
236 'type' => CRM_Utils_Type
::T_TEXT
,
237 'title' => ts('Arguments') ,
238 'description' => 'Arguments to pass to the url',
242 'type' => CRM_Utils_Type
::T_STRING
,
243 'title' => ts('Menu Title') ,
245 'size' => CRM_Utils_Type
::HUGE
,
247 'access_callback' => array(
248 'name' => 'access_callback',
249 'type' => CRM_Utils_Type
::T_STRING
,
250 'title' => ts('Access Callback') ,
251 'description' => 'Function to call to check access permissions',
253 'size' => CRM_Utils_Type
::HUGE
,
255 'access_arguments' => array(
256 'name' => 'access_arguments',
257 'type' => CRM_Utils_Type
::T_TEXT
,
258 'title' => ts('Access Arguments') ,
259 'description' => 'Arguments to pass to access callback',
261 'page_callback' => array(
262 'name' => 'page_callback',
263 'type' => CRM_Utils_Type
::T_STRING
,
264 'title' => ts('Page Callback') ,
265 'description' => 'function to call for this url',
267 'size' => CRM_Utils_Type
::HUGE
,
269 'page_arguments' => array(
270 'name' => 'page_arguments',
271 'type' => CRM_Utils_Type
::T_TEXT
,
272 'title' => ts('Page Arguments') ,
273 'description' => 'Arguments to pass to page callback',
275 'breadcrumb' => array(
276 'name' => 'breadcrumb',
277 'type' => CRM_Utils_Type
::T_TEXT
,
278 'title' => ts('Breadcrumb') ,
279 'description' => 'Breadcrumb for the path.',
281 'return_url' => array(
282 'name' => 'return_url',
283 'type' => CRM_Utils_Type
::T_STRING
,
284 'title' => ts('Return Url') ,
285 'description' => 'Url where a page should redirected to, if next url not known.',
287 'size' => CRM_Utils_Type
::HUGE
,
289 'return_url_args' => array(
290 'name' => 'return_url_args',
291 'type' => CRM_Utils_Type
::T_STRING
,
292 'title' => ts('Return Url Args') ,
293 'description' => 'Arguments to pass to return_url',
295 'size' => CRM_Utils_Type
::HUGE
,
297 'component_id' => array(
298 'name' => 'component_id',
299 'type' => CRM_Utils_Type
::T_INT
,
300 'title' => ts('Component') ,
301 'description' => 'Component that this menu item belongs to',
302 'FKClassName' => 'CRM_Core_DAO_Component',
306 'pseudoconstant' => array(
307 'table' => 'civicrm_component',
309 'labelColumn' => 'name',
312 'is_active' => array(
313 'name' => 'is_active',
314 'type' => CRM_Utils_Type
::T_BOOLEAN
,
315 'title' => ts('Enabled?') ,
316 'description' => 'Is this menu item active?',
318 'is_public' => array(
319 'name' => 'is_public',
320 'type' => CRM_Utils_Type
::T_BOOLEAN
,
321 'title' => ts('Public?') ,
322 'description' => 'Is this menu accessible to the public?',
324 'is_exposed' => array(
325 'name' => 'is_exposed',
326 'type' => CRM_Utils_Type
::T_BOOLEAN
,
327 'title' => ts('Exposed?') ,
328 'description' => 'Is this menu exposed to the navigation system?',
332 'type' => CRM_Utils_Type
::T_BOOLEAN
,
333 'title' => ts('Use SSL?') ,
334 'description' => 'Should this menu be exposed via SSL if enabled?',
338 'type' => CRM_Utils_Type
::T_INT
,
339 'title' => ts('Order') ,
340 'description' => 'Ordering of the menu items in various blocks.',
346 'type' => CRM_Utils_Type
::T_INT
,
347 'title' => ts('Type') ,
348 'description' => 'Drupal menu type.',
352 'page_type' => array(
353 'name' => 'page_type',
354 'type' => CRM_Utils_Type
::T_INT
,
355 'title' => ts('Page Type') ,
356 'description' => 'CiviCRM menu type.',
360 'skipBreadcrumb' => array(
361 'name' => 'skipBreadcrumb',
362 'type' => CRM_Utils_Type
::T_BOOLEAN
,
363 'title' => ts('Hide Breadcrumb?') ,
364 'description' => 'skip this url being exposed to breadcrumb',
367 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
369 return Civi
::$statics[__CLASS__
]['fields'];
372 * Return a mapping from field-name to the corresponding key (as used in fields()).
375 * Array(string $name => string $uniqueName).
377 static function &fieldKeys() {
378 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
379 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
381 return Civi
::$statics[__CLASS__
]['fieldKeys'];
384 * Returns the names of this table
388 static function getTableName() {
389 return self
::$_tableName;
392 * Returns if this table needs to be logged
400 * Returns the list of fields that can be imported
402 * @param bool $prefix
406 static function &import($prefix = false) {
407 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'menu', $prefix, array());
411 * Returns the list of fields that can be exported
413 * @param bool $prefix
417 static function &export($prefix = false) {
418 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'menu', $prefix, array());