Merge pull request #23609 from briennekordis/leading_zero_fix
[civicrm-core.git] / CRM / Admin / Page / Navigation.php
CommitLineData
6a488035
TO
1<?php
2/*
3 +--------------------------------------------------------------------+
bc77d7c0 4 | Copyright CiviCRM LLC. All rights reserved. |
6a488035 5 | |
bc77d7c0
TO
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
6a488035 9 +--------------------------------------------------------------------+
d25dd0ee 10 */
6a488035
TO
11
12/**
13 *
14 * @package CRM
ca5cec67 15 * @copyright CiviCRM LLC https://civicrm.org/licensing
6a488035
TO
16 */
17
18/**
ce064e4f 19 * Page for displaying list of location types.
6a488035
TO
20 */
21class CRM_Admin_Page_Navigation extends CRM_Core_Page_Basic {
22
23 /**
eceb18cc 24 * The action links that we need to display for the browse screen.
6a488035
TO
25 *
26 * @var array
6a488035 27 */
62d3ee27 28 public static $_links = NULL;
6a488035
TO
29
30 /**
eceb18cc 31 * Get BAO Name.
6a488035 32 *
a6c01b45
CW
33 * @return string
34 * Classname of BAO.
6a488035 35 */
00be9182 36 public function getBAOName() {
6a488035
TO
37 return 'CRM_Core_BAO_Navigation';
38 }
39
40 /**
eceb18cc 41 * Get action Links.
6a488035 42 *
a1a2a83d 43 * @return array|NULL
a6c01b45 44 * (reference) of action links
6a488035 45 */
02fc859b 46 public function &links() {
a1a2a83d 47 return NULL;
02fc859b 48 }
6a488035
TO
49
50 /**
eceb18cc 51 * Get name of edit form.
6a488035 52 *
a6c01b45
CW
53 * @return string
54 * Classname of edit form.
6a488035 55 */
00be9182 56 public function editForm() {
6a488035
TO
57 return 'CRM_Admin_Form_Navigation';
58 }
59
60 /**
eceb18cc 61 * Get edit form name.
6a488035 62 *
a6c01b45
CW
63 * @return string
64 * name of this page.
6a488035 65 */
00be9182 66 public function editName() {
6a488035
TO
67 return 'CiviCRM Navigation';
68 }
69
70 /**
71 * Get user context.
72 *
dd244018
EM
73 * @param null $mode
74 *
a6c01b45
CW
75 * @return string
76 * user context.
6a488035 77 */
00be9182 78 public function userContext($mode = NULL) {
6a488035
TO
79 return 'civicrm/admin/menu';
80 }
81
82 /**
eceb18cc 83 * Browse all menus.
6a488035 84 */
00be9182 85 public function browse() {
6a488035
TO
86 // assign home id to the template
87 $homeMenuId = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_Navigation', 'Home', 'id', 'name');
88 $this->assign('homeMenuId', $homeMenuId);
8ef12e64 89
6a488035
TO
90 // Add jstree support
91 CRM_Core_Resources::singleton()
656e5c5b
CW
92 ->addScriptFile('civicrm', 'bower_components/jstree/dist/jstree.min.js', 0, 'html-header')
93 ->addStyleFile('civicrm', 'bower_components/jstree/dist/themes/default/style.min.css');
6a488035 94 }
96025800 95
6a488035 96}