8fb257635cabff3f79bd8bc21fa9591a589e92cf
3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
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 |
9 +--------------------------------------------------------------------+
15 * @copyright CiviCRM LLC https://civicrm.org/licensing
19 * Page for displaying Administer CiviCRM Control Panel.
21 class CRM_Admin_Page_Admin
extends CRM_Core_Page
{
28 public function run() {
29 Civi
::resources()->addStyleFile('civicrm', 'css/admin.css');
31 $this->assign('registerSite', htmlspecialchars('https://civicrm.org/register-your-site?src=iam&sid=' . CRM_Utils_System
::getSiteID()));
34 'Customize Data and Screens' => ts('Customize Data and Screens'),
35 'Communications' => ts('Communications'),
36 'Localization' => ts('Localization'),
37 'Users and Permissions' => ts('Users and Permissions'),
38 'System Settings' => ts('System Settings'),
41 $config = CRM_Core_Config
::singleton();
43 foreach ($config->enableComponents
as $component) {
44 $comp = CRM_Core_Component
::get($component);
45 $groups[$comp->info
['name']] = $comp->info
['translatedName'];
48 $values = CRM_Core_Menu
::getAdminLinks();
50 foreach ($groups as $group => $title) {
51 $groupId = str_replace(' ', '_', $group);
52 $adminPanel[$groupId] = array_merge($values[$group] ??
[], ['title' => $title]);
55 CRM_Utils_Hook
::alterAdminPanel($adminPanel);
56 foreach ($adminPanel as $groupId => $group) {
57 if (count($group) == 1) {
58 // Presumably the only thing is the title; remove the section.
59 // This is done here to give the hook a chance to edit the section.
60 unset($adminPanel[$groupId]);
63 $this->assign('adminPanel', $adminPanel);