コード例 #1
0
ファイル: Factory.php プロジェクト: jlehmus/NDL-VuFind2
 /**
  * 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);
 }
コード例 #2
0
ファイル: Factory.php プロジェクト: grharry/vufind
 /**
  * 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()));
 }