1 | <?php |
||
2 | |||
3 | /* Divine CMS - Open source CMS for widespread use. |
||
4 | Copyright (c) 2019 Mykola Burakov ([email protected]) |
||
5 | |||
6 | See SOURCE.txt for other and additional information. |
||
7 | |||
8 | This file is part of Divine CMS. |
||
9 | |||
10 | This program is free software: you can redistribute it and/or modify |
||
11 | it under the terms of the GNU General Public License as published by |
||
12 | the Free Software Foundation, either version 3 of the License, or |
||
13 | (at your option) any later version. |
||
14 | |||
15 | This program is distributed in the hope that it will be useful, |
||
16 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
18 | GNU General Public License for more details. |
||
19 | |||
20 | You should have received a copy of the GNU General Public License |
||
21 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
||
22 | |||
23 | class ControllerCommonFooter extends \Divine\Engine\Core\Controller |
||
0 ignored issues
–
show
|
|||
24 | { |
||
25 | public function index() |
||
0 ignored issues
–
show
|
|||
26 | { |
||
27 | $this->load->language('common/footer'); |
||
28 | |||
29 | $data['scripts'] = $this->document->getScripts('footer'); |
||
0 ignored issues
–
show
Comprehensibility
Best Practice
introduced
by
|
|||
30 | |||
31 | $data['text_information'] = $this->language->get('text_information'); |
||
32 | $data['text_service'] = $this->language->get('text_service'); |
||
33 | $data['text_extra'] = $this->language->get('text_extra'); |
||
34 | $data['text_contact'] = $this->language->get('text_contact'); |
||
35 | $data['text_manufacturer'] = $this->language->get('text_manufacturer'); |
||
36 | $data['text_special'] = $this->language->get('text_special'); |
||
37 | $data['text_bestseller'] = $this->language->get('text_bestseller'); |
||
38 | $data['text_mostviewed'] = $this->language->get('text_mostviewed'); |
||
39 | $data['text_latest'] = $this->language->get('text_latest'); |
||
40 | $data['text_account'] = $this->language->get('text_account'); |
||
41 | $data['text_order'] = $this->language->get('text_order'); |
||
42 | $data['text_newsletter'] = $this->language->get('text_newsletter'); |
||
43 | $data['text_powered'] = $this->language->get('text_powered'); |
||
44 | |||
45 | $data['store_name'] = $this->config->get('config_name'); |
||
46 | $data['store_year'] = date('Y', time()); |
||
47 | |||
48 | if (is_file($_SERVER['DOCUMENT_ROOT'] . '/public_html/assets/images/' . $this->config->get('config_logo'))) { |
||
49 | $data['logo'] = '/public_html/assets/images/' . $this->config->get('config_logo'); |
||
50 | } else { |
||
51 | $data['logo'] = ''; |
||
52 | } |
||
53 | |||
54 | $this->load->model('catalog/information'); |
||
55 | |||
56 | $data['informations'] = array(); |
||
57 | |||
58 | foreach ($this->model_catalog_information->getInformations() as $result) { |
||
59 | if ($result['bottom']) { |
||
60 | $data['informations'][] = array( |
||
61 | 'title' => $result['title'], |
||
62 | 'href' => $this->url->link('information/information', 'information_id=' . $result['information_id']) |
||
63 | ); |
||
64 | } |
||
65 | } |
||
66 | |||
67 | $data['contact'] = $this->url->link('information/contact'); |
||
68 | $data['manufacturer'] = $this->url->link('product/manufacturer'); |
||
69 | $data['special'] = $this->url->link('product/special'); |
||
70 | $data['bestseller'] = $this->url->link('product/bestseller'); |
||
71 | $data['mostviewed'] = $this->url->link('product/mostviewed'); |
||
72 | $data['latest'] = $this->url->link('product/latest'); |
||
73 | $data['account'] = $this->url->link('account/account', '', true); |
||
74 | $data['order'] = $this->url->link('account/order', '', true); |
||
75 | $data['newsletter'] = $this->url->link('account/newsletter', '', true); |
||
76 | |||
77 | return $this->load->view('common/footer', $data); |
||
78 | } |
||
79 | } |
||
80 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.