first commit
This commit is contained in:
23
catalog/model/setting/module.php
Normal file
23
catalog/model/setting/module.php
Normal file
@ -0,0 +1,23 @@
|
||||
<?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 [];
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user