* @copyright 2007-2011 PrestaShop SA * @version Release: $Revision: 1.4 $ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * International Registered Trademark & Property of PrestaShop SA */ class ThemeCore extends ObjectModel { public $name; protected $fieldsSize = array('name' => 64); protected $fieldsValidate = array('name' => 'isGenericName'); protected $table = 'theme'; protected $identifier = 'id_theme'; public function getFields() { parent::validateFields(); $fields['name'] = pSQL($this->name); return $fields; } public static function getThemes() { $sql = 'SELECT * FROM '._DB_PREFIX_.'theme ORDER BY name'; return Db::getInstance()->ExecuteS($sql); } }