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/Core/Menu.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:d8e5fdbc1e7295d660e44d94a81db6e7)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
38 * CRM_Core_DAO_Menu constructor.
40 class CRM_Core_DAO_Menu
extends CRM_Core_DAO
{
42 * Static instance to hold the table name.
46 static $_tableName = 'civicrm_menu';
48 * Should CiviCRM log any modifications to this table in the civicrm_log table.
59 * Which Domain is this menu item for
71 * Arguments to pass to the url
75 public $path_arguments;
82 * Function to call to check access permissions
86 public $access_callback;
88 * Arguments to pass to access callback
92 public $access_arguments;
94 * function to call for this url
98 public $page_callback;
100 * Arguments to pass to page callback
104 public $page_arguments;
106 * Breadcrumb for the path.
112 * Url where a page should redirected to, if next url not known.
118 * Arguments to pass to return_url
122 public $return_url_args;
124 * Component that this menu item belongs to
128 public $component_id;
130 * Is this menu item active?
136 * Is this menu accessible to the public?
142 * Is this menu exposed to the navigation system?
148 * Should this menu be exposed via SSL if enabled?
154 * Ordering of the menu items in various blocks.
172 * skip this url being exposed to breadcrumb
176 public $skipBreadcrumb;
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') ,
212 'table_name' => 'civicrm_menu',
214 'bao' => 'CRM_Core_DAO_Menu',
217 'domain_id' => array(
218 'name' => 'domain_id',
219 'type' => CRM_Utils_Type
::T_INT
,
220 'title' => ts('Domain') ,
221 'description' => 'Which Domain is this menu item for',
223 'table_name' => 'civicrm_menu',
225 'bao' => 'CRM_Core_DAO_Menu',
227 'FKClassName' => 'CRM_Core_DAO_Domain',
228 'pseudoconstant' => array(
229 'table' => 'civicrm_domain',
231 'labelColumn' => 'name',
236 'type' => CRM_Utils_Type
::T_STRING
,
237 'title' => ts('Path') ,
238 'description' => 'Path Name',
240 'size' => CRM_Utils_Type
::HUGE
,
241 'table_name' => 'civicrm_menu',
243 'bao' => 'CRM_Core_DAO_Menu',
246 'path_arguments' => array(
247 'name' => 'path_arguments',
248 'type' => CRM_Utils_Type
::T_TEXT
,
249 'title' => ts('Arguments') ,
250 'description' => 'Arguments to pass to the url',
251 'table_name' => 'civicrm_menu',
253 'bao' => 'CRM_Core_DAO_Menu',
258 'type' => CRM_Utils_Type
::T_STRING
,
259 'title' => ts('Menu Title') ,
261 'size' => CRM_Utils_Type
::HUGE
,
262 'table_name' => 'civicrm_menu',
264 'bao' => 'CRM_Core_DAO_Menu',
267 'access_callback' => array(
268 'name' => 'access_callback',
269 'type' => CRM_Utils_Type
::T_STRING
,
270 'title' => ts('Access Callback') ,
271 'description' => 'Function to call to check access permissions',
273 'size' => CRM_Utils_Type
::HUGE
,
274 'table_name' => 'civicrm_menu',
276 'bao' => 'CRM_Core_DAO_Menu',
279 'access_arguments' => array(
280 'name' => 'access_arguments',
281 'type' => CRM_Utils_Type
::T_TEXT
,
282 'title' => ts('Access Arguments') ,
283 'description' => 'Arguments to pass to access callback',
284 'table_name' => 'civicrm_menu',
286 'bao' => 'CRM_Core_DAO_Menu',
289 'page_callback' => array(
290 'name' => 'page_callback',
291 'type' => CRM_Utils_Type
::T_STRING
,
292 'title' => ts('Page Callback') ,
293 'description' => 'function to call for this url',
295 'size' => CRM_Utils_Type
::HUGE
,
296 'table_name' => 'civicrm_menu',
298 'bao' => 'CRM_Core_DAO_Menu',
301 'page_arguments' => array(
302 'name' => 'page_arguments',
303 'type' => CRM_Utils_Type
::T_TEXT
,
304 'title' => ts('Page Arguments') ,
305 'description' => 'Arguments to pass to page callback',
306 'table_name' => 'civicrm_menu',
308 'bao' => 'CRM_Core_DAO_Menu',
311 'breadcrumb' => array(
312 'name' => 'breadcrumb',
313 'type' => CRM_Utils_Type
::T_TEXT
,
314 'title' => ts('Breadcrumb') ,
315 'description' => 'Breadcrumb for the path.',
316 'table_name' => 'civicrm_menu',
318 'bao' => 'CRM_Core_DAO_Menu',
321 'return_url' => array(
322 'name' => 'return_url',
323 'type' => CRM_Utils_Type
::T_STRING
,
324 'title' => ts('Return Url') ,
325 'description' => 'Url where a page should redirected to, if next url not known.',
327 'size' => CRM_Utils_Type
::HUGE
,
328 'table_name' => 'civicrm_menu',
330 'bao' => 'CRM_Core_DAO_Menu',
333 'return_url_args' => array(
334 'name' => 'return_url_args',
335 'type' => CRM_Utils_Type
::T_STRING
,
336 'title' => ts('Return Url Args') ,
337 'description' => 'Arguments to pass to return_url',
339 'size' => CRM_Utils_Type
::HUGE
,
340 'table_name' => 'civicrm_menu',
342 'bao' => 'CRM_Core_DAO_Menu',
345 'component_id' => array(
346 'name' => 'component_id',
347 'type' => CRM_Utils_Type
::T_INT
,
348 'title' => ts('Component') ,
349 'description' => 'Component that this menu item belongs to',
350 'table_name' => 'civicrm_menu',
352 'bao' => 'CRM_Core_DAO_Menu',
354 'FKClassName' => 'CRM_Core_DAO_Component',
358 'pseudoconstant' => array(
359 'table' => 'civicrm_component',
361 'labelColumn' => 'name',
364 'is_active' => array(
365 'name' => 'is_active',
366 'type' => CRM_Utils_Type
::T_BOOLEAN
,
367 'title' => ts('Enabled?') ,
368 'description' => 'Is this menu item active?',
369 'table_name' => 'civicrm_menu',
371 'bao' => 'CRM_Core_DAO_Menu',
374 'is_public' => array(
375 'name' => 'is_public',
376 'type' => CRM_Utils_Type
::T_BOOLEAN
,
377 'title' => ts('Public?') ,
378 'description' => 'Is this menu accessible to the public?',
379 'table_name' => 'civicrm_menu',
381 'bao' => 'CRM_Core_DAO_Menu',
384 'is_exposed' => array(
385 'name' => 'is_exposed',
386 'type' => CRM_Utils_Type
::T_BOOLEAN
,
387 'title' => ts('Exposed?') ,
388 'description' => 'Is this menu exposed to the navigation system?',
389 'table_name' => 'civicrm_menu',
391 'bao' => 'CRM_Core_DAO_Menu',
396 'type' => CRM_Utils_Type
::T_BOOLEAN
,
397 'title' => ts('Use SSL?') ,
398 'description' => 'Should this menu be exposed via SSL if enabled?',
399 'table_name' => 'civicrm_menu',
401 'bao' => 'CRM_Core_DAO_Menu',
406 'type' => CRM_Utils_Type
::T_INT
,
407 'title' => ts('Order') ,
408 'description' => 'Ordering of the menu items in various blocks.',
411 'table_name' => 'civicrm_menu',
413 'bao' => 'CRM_Core_DAO_Menu',
418 'type' => CRM_Utils_Type
::T_INT
,
419 'title' => ts('Type') ,
420 'description' => 'Drupal menu type.',
423 'table_name' => 'civicrm_menu',
425 'bao' => 'CRM_Core_DAO_Menu',
428 'page_type' => array(
429 'name' => 'page_type',
430 'type' => CRM_Utils_Type
::T_INT
,
431 'title' => ts('Page Type') ,
432 'description' => 'CiviCRM menu type.',
435 'table_name' => 'civicrm_menu',
437 'bao' => 'CRM_Core_DAO_Menu',
440 'skipBreadcrumb' => array(
441 'name' => 'skipBreadcrumb',
442 'type' => CRM_Utils_Type
::T_BOOLEAN
,
443 'title' => ts('Hide Breadcrumb?') ,
444 'description' => 'skip this url being exposed to breadcrumb',
445 'table_name' => 'civicrm_menu',
447 'bao' => 'CRM_Core_DAO_Menu',
451 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
453 return Civi
::$statics[__CLASS__
]['fields'];
456 * Return a mapping from field-name to the corresponding key (as used in fields()).
459 * Array(string $name => string $uniqueName).
461 static function &fieldKeys() {
462 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
463 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
465 return Civi
::$statics[__CLASS__
]['fieldKeys'];
468 * Returns the names of this table
472 static function getTableName() {
473 return self
::$_tableName;
476 * Returns if this table needs to be logged
484 * Returns the list of fields that can be imported
486 * @param bool $prefix
490 static function &import($prefix = false) {
491 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'menu', $prefix, array());
495 * Returns the list of fields that can be exported
497 * @param bool $prefix
501 static function &export($prefix = false) {
502 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'menu', $prefix, array());
506 * Returns the list of indices
508 public static function indices($localize = TRUE) {
510 'UI_path_domain_id' => array(
511 'name' => 'UI_path_domain_id',
516 'localizable' => false,
518 'sig' => 'civicrm_menu::1::path::domain_id',
521 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;