'jxmegalayout_extra_html', 'primary' => 'id_extra_html', 'multilang' => true, 'fields' => array( 'name' => array('type' => self::TYPE_STRING, 'validate' => 'isString', 'required' => true, 'lang' => true), 'content' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isCleanHtml', 'size' => 4000), 'specific_class' => array('type' => self::TYPE_STRING, 'validate' => 'isCleanHtml', 'size' => 128) ), ); /** * Get the list of all available HTML blocks * * @param $id_lang * * @return array|false|mysqli_result|null|PDOStatement|resource * @throws PrestaShopDatabaseException */ public static function getList($id_lang) { return Db::getInstance()->executeS(' SELECT *, jeh.`id_extra_html` as `id` FROM '._DB_PREFIX_.'jxmegalayout_extra_html jeh LEFT JOIN '._DB_PREFIX_.'jxmegalayout_extra_html_lang jehl ON(jeh.`id_extra_html` = jehl.`id_extra_html`) WHERE jehl.`id_lang` = '.(int)$id_lang); } public static function getItem($id_item, $id_lang) { return Db::getInstance()->getRow(' SELECT jeh.*, jehl.* FROM '._DB_PREFIX_.'jxmegalayout_extra_html jeh LEFT JOIN '._DB_PREFIX_.'jxmegalayout_extra_html_lang jehl ON(jeh.`id_extra_html` = jehl.`id_extra_html`) WHERE jeh.`id_extra_html` = '.(int)$id_item.' AND jehl.`id_lang` = '.(int)$id_lang); } }