1: | <?php
2: | namespace Opencart\Catalog\Controller\Error;
3: | /**
4: | * Class Not Found
5: | *
6: | * @package Opencart\Catalog\Controller\Error
7: | */
8: | class NotFound extends \Opencart\System\Engine\Controller {
9: | /**
10: | * @return void
11: | */
12: | public function index(): void {
13: | $this->load->language('error/not_found');
14: |
15: | $this->document->setTitle($this->language->get('heading_title'));
16: |
17: | $data['breadcrumbs'] = [];
18: |
19: | $data['breadcrumbs'][] = [
20: | 'text' => $this->language->get('text_home'),
21: | 'href' => $this->url->link('common/home', 'language=' . $this->config->get('config_language'))
22: | ];
23: |
24: | if (isset($this->request->get['route'])) {
25: | $url_data = $this->request->get;
26: |
27: | $route = $url_data['route'];
28: |
29: | unset($url_data['route']);
30: |
31: | $url = '';
32: |
33: | if ($url_data) {
34: | $url .= '&' . urldecode(http_build_query($url_data, '', '&'));
35: | }
36: |
37: | $data['breadcrumbs'][] = [
38: | 'text' => $this->language->get('heading_title'),
39: | 'href' => $this->url->link($route, $url)
40: | ];
41: | }
42: |
43: | $data['continue'] = $this->url->link('common/home', 'language=' . $this->config->get('config_language'));
44: |
45: | $data['column_left'] = $this->load->controller('common/column_left');
46: | $data['column_right'] = $this->load->controller('common/column_right');
47: | $data['content_top'] = $this->load->controller('common/content_top');
48: | $data['content_bottom'] = $this->load->controller('common/content_bottom');
49: | $data['footer'] = $this->load->controller('common/footer');
50: | $data['header'] = $this->load->controller('common/header');
51: |
52: | $this->response->addHeader($this->request->server['SERVER_PROTOCOL'] . ' 404 Not Found');
53: |
54: | $this->response->setOutput($this->load->view('error/not_found', $data));
55: | }
56: | }
57: |

OpenCart API API documentation generated by ApiGen dev-master