/** * Checks if a theme is already installed. * * @param string $theme * @return bool */ public static function isThemeInstalled($theme) { return (bool) BackendModeL::getDB()->getVar('SELECT COUNT(id) FROM themes_templates WHERE theme = ?', array($theme)); }
/** * Checks if a theme is already installed. * * @param string $theme * * @return bool */ public static function isThemeInstalled($theme) { return (bool) BackendModeL::getContainer()->get('database')->getVar('SELECT 1 FROM themes_templates WHERE theme = ? LIMIT 1', array($theme)); }