1 <?php
2
3 /*
4 * This file is part of the Icybee/Installer package.
5 *
6 * (c) Olivier Laviale <olivier.laviale@gmail.com>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12 namespace Icybee\Installer;
13
14 use ICanBoogie\Errors;
15
16 /**
17 * Checks startup requirements.
18 */
19 class RequirementsOperation extends Operation
20 {
21 protected function get_installer_operation_id()
22 {
23 return 'welcome';
24 }
25
26 protected function validate(Errors $errors)
27 {
28 return true;
29 }
30
31 protected function process()
32 {
33 $requirements = WelcomeRequirements::get();
34 $rendered_requirements = $requirements->render();
35
36 $this->response['requirements_element'] = $rendered_requirements;
37
38 if ($rendered_requirements)
39 {
40 return;
41 }
42
43 $this->response->message = t('panel.welcome.success');
44
45 return parent::process();
46 }
47 }