/** * Construct the cookie manager. * * @param ServiceManager $sm Service manager. * * @return \VuFind\Cookie\CookieManager */ public static function getCookieManager(ServiceManager $sm) { if (Console::isConsole()) { return false; } return parent::getCookieManager($sm); }
/** * Construct the DisplayLanguageOption helper. * * @param ServiceManager $sm Service manager. * * @return DisplayLanguageOption */ public static function getDisplayLanguageOption(ServiceManager $sm) { // We want to construct a separate translator instance for this helper, // since it configures different language/locale than the core shared // instance! return new DisplayLanguageOption(\VuFind\Service\Factory::getTranslator($sm->getServiceLocator())); }