| 1: | <?php
|
| 2: | namespace Opencart\Catalog\Controller\Extension\Opencart\Module;
|
| 3: | |
| 4: | |
| 5: | |
| 6: | |
| 7: |
|
| 8: | class Information extends \Opencart\System\Engine\Controller {
|
| 9: | |
| 10: | |
| 11: | |
| 12: | |
| 13: |
|
| 14: | public function index(): string {
|
| 15: | $this->load->language('extension/opencart/module/information');
|
| 16: |
|
| 17: | $this->load->model('catalog/information');
|
| 18: |
|
| 19: | $data['informations'] = [];
|
| 20: |
|
| 21: | foreach ($this->model_catalog_information->getInformations() as $result) {
|
| 22: | $data['informations'][] = [
|
| 23: | 'title' => $result['title'],
|
| 24: | 'href' => $this->url->link('information/information', 'language=' . $this->config->get('config_language') . '&information_id=' . $result['information_id'])
|
| 25: | ];
|
| 26: | }
|
| 27: |
|
| 28: | $data['contact'] = $this->url->link('information/contact', 'language=' . $this->config->get('config_language'));
|
| 29: | $data['sitemap'] = $this->url->link('information/sitemap', 'language=' . $this->config->get('config_language'));
|
| 30: |
|
| 31: | return $this->load->view('extension/opencart/module/information', $data);
|
| 32: | }
|
| 33: | }
|
| 34: | |