* @copyright 2007-2017 PrestaShop SA * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * International Registered Trademark & Property of PrestaShop SA */ class GuestRegPaymentMethodCore extends ObjectModel { public $active = 1; public $name; public $date_add; public $date_upd; public static $definition = array( 'table' => 'guest_reg_payment_method', 'primary' => 'id_guest_reg_payment_method', 'multilang' => true, 'fields' => array( 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), 'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), 'name' => array( 'type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCatalogName', 'required' => true, 'size' => 255, ), ), ); public static function getActiveOptions($idLang) { return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS( 'SELECT a.`id_guest_reg_payment_method`, al.`name` FROM `'._DB_PREFIX_.'guest_reg_payment_method` a INNER JOIN `'._DB_PREFIX_.'guest_reg_payment_method_lang` al ON (a.`id_guest_reg_payment_method` = al.`id_guest_reg_payment_method` AND al.`id_lang` = '.(int) $idLang.') WHERE a.`active` = 1 ORDER BY al.`name` ASC' ); } }