Commit | Line | Data |
---|---|---|
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 TO |
9 | +--------------------------------------------------------------------+ |
10 | */ | |
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 site configuration tasks with links to each setting form. |
6a488035 TO |
20 | */ |
21 | class CRM_Admin_Page_ConfigTaskList extends CRM_Core_Page { | |
62d3ee27 | 22 | |
e0ef6999 | 23 | /** |
ce064e4f | 24 | * Run page. |
25 | * | |
e0ef6999 EM |
26 | * @return string |
27 | */ | |
00be9182 | 28 | public function run() { |
4ef8abc2 | 29 | Civi::resources()->addStyleFile('civicrm', 'css/admin.css'); |
6a488035 TO |
30 | |
31 | CRM_Utils_System::setTitle(ts("Configuration Checklist")); | |
32 | $this->assign('recentlyViewed', FALSE); | |
33 | ||
34 | $destination = CRM_Utils_System::url('civicrm/admin/configtask', | |
35 | 'reset=1', | |
36 | FALSE, NULL, FALSE | |
37 | ); | |
38 | ||
39 | $destination = urlencode($destination); | |
40 | $this->assign('destination', $destination); | |
41 | ||
96e82f8f CW |
42 | $this->assign('registerSite', htmlspecialchars('https://civicrm.org/register-your-site?src=iam&sid=' . CRM_Utils_System::getSiteID())); |
43 | ||
2f0a08e9 EL |
44 | //Provide ability to optionally display some component checklist items when components are on |
45 | $result = civicrm_api3('Setting', 'get', [ | |
46 | 'sequential' => 1, | |
47 | 'return' => ["enable_components"], | |
48 | ]); | |
affcc9d2 | 49 | $enabled = []; |
2f0a08e9 EL |
50 | foreach ($result['values'][0]['enable_components'] as $component) { |
51 | $enabled[$component] = 1; | |
52 | } | |
6f11486c SL |
53 | |
54 | // Create an array of translated Component titles to use as part of links on the page. | |
55 | $translatedComponents = CRM_Core_Component::getNames(TRUE); | |
56 | $translatedTitles = []; | |
57 | foreach (CRM_Core_Component::getNames() as $key => $component) { | |
58 | $translatedTitles[$component] = $translatedComponents[$key]; | |
59 | } | |
60 | $this->assign('componentTitles', $translatedTitles); | |
2f0a08e9 EL |
61 | $this->assign('enabledComponents', $enabled); |
62 | ||
6a488035 TO |
63 | return parent::run(); |
64 | } | |
96025800 | 65 | |
6a488035 | 66 | } |