1: | <?php
2: | namespace Opencart\Catalog\Model\Setting;
3: | /**
4: | * Class Module
5: | *
6: | * @package Opencart\Catalog\Model\Setting
7: | */
8: | class Module extends \Opencart\System\Engine\Model {
9: | /**
10: | * Get Module
11: | *
12: | * @param int $module_id
13: | *
14: | * @return array<mixed>
15: | */
16: | public function getModule(int $module_id): array {
17: | $query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "module` WHERE `module_id` = '" . (int)$module_id . "'");
18: |
19: | if ($query->row) {
20: | return json_decode($query->row['setting'], true);
21: | } else {
22: | return [];
23: | }
24: | }
25: | }
26: |

OpenCart API API documentation generated by ApiGen dev-master