1: | <?php
2: | namespace Opencart\Catalog\Model\Design;
3: | /**
4: | * Class Banner
5: | *
6: | * @package Opencart\Catalog\Model\Design
7: | */
8: | class Banner extends \Opencart\System\Engine\Model {
9: | /**
10: | * Get Banner
11: | *
12: | * @param int $banner_id
13: | *
14: | * @return array<int, array<string, mixed>>
15: | */
16: | public function getBanner(int $banner_id): array {
17: | $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "banner` `b` LEFT JOIN `" . DB_PREFIX . "banner_image` `bi` ON (`b`.`banner_id` = `bi`.`banner_id`) WHERE `b`.`banner_id` = '" . (int)$banner_id . "' AND `b`.`status` = '1' AND `bi`.`language_id` = '" . (int)$this->config->get('config_language_id') . "' ORDER BY `bi`.`sort_order` ASC");
18: |
19: | return $query->rows;
20: | }
21: | }
22: |

OpenCart API API documentation generated by ApiGen dev-master