Ekdant-Online-Store/catalog/model/setting/module.php

24 lines
512 B
PHP
Raw Permalink Normal View History

2024-08-06 12:21:00 +00:00
<?php
namespace Opencart\Catalog\Model\Setting;
/**
* Class Module
*
* @package Opencart\Catalog\Model\Setting
*/
class Module extends \Opencart\System\Engine\Model {
/**
* @param int $module_id
*
* @return array
*/
public function getModule(int $module_id): array {
$query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "module` WHERE `module_id` = '" . (int)$module_id . "'");
if ($query->row) {
return json_decode($query->row['setting'], true);
} else {
return [];
}
}
}