1: | <?php
2: | namespace Opencart\Catalog\Controller\Common;
3: | /**
4: | * Class Maintenance
5: | *
6: | * @package Opencart\Catalog\Controller\Common
7: | */
8: | class Maintenance extends \Opencart\System\Engine\Controller {
9: | /**
10: | * @return void
11: | */
12: | public function index(): void {
13: | $this->load->language('common/maintenance');
14: |
15: | $this->document->setTitle($this->language->get('heading_title'));
16: |
17: | if ($this->request->server['SERVER_PROTOCOL'] == 'HTTP/1.1') {
18: | $this->response->addHeader('HTTP/1.1 503 Service Unavailable');
19: | } else {
20: | $this->response->addHeader('HTTP/1.0 503 Service Unavailable');
21: | }
22: |
23: | $this->response->addHeader('Retry-After: 3600');
24: |
25: | $data['breadcrumbs'] = [];
26: |
27: | $data['breadcrumbs'][] = [
28: | 'text' => $this->language->get('text_maintenance'),
29: | 'href' => $this->url->link('common/maintenance', 'language=' . $this->config->get('config_language'))
30: | ];
31: |
32: | $data['message'] = $this->language->get('text_message');
33: |
34: | $data['header'] = $this->load->controller('common/header');
35: | $data['footer'] = $this->load->controller('common/footer');
36: |
37: | $this->response->setOutput($this->load->view('common/maintenance', $data));
38: | }
39: | }
40: |

OpenCart API API documentation generated by ApiGen dev-master