X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=Civi%2FAPI%2FSubscriber%2FI18nSubscriber.php;h=58d325ba738f7406720a5d4f4df8f8e1506d3421;hb=HEAD;hp=ec44a3c7a382a250f5319bbea2cc63bfa5659efe;hpb=39de6fd54b9843705d13cb9f70fbcc6296103670;p=civicrm-core.git diff --git a/Civi/API/Subscriber/I18nSubscriber.php b/Civi/API/Subscriber/I18nSubscriber.php index ec44a3c7a3..58d325ba73 100644 --- a/Civi/API/Subscriber/I18nSubscriber.php +++ b/Civi/API/Subscriber/I18nSubscriber.php @@ -1,9 +1,9 @@ array('onApiPrepare', Events::W_MIDDLE) + Events::PREPARE => array('onApiPrepare', Events::W_MIDDLE), ); } /** * @param \Civi\API\Event\Event $event + * API preparation event. * * @throws \API_Exception */ @@ -61,6 +63,8 @@ class I18nSubscriber implements EventSubscriberInterface { * Sets the tsLocale and dbLocale for multi-lingual sites. * Some code duplication from CRM/Core/BAO/ConfigSetting.php retrieve() * to avoid regressions from refactoring. + * @param $lcMessagesRequest + * @throws \API_Exception */ public function setLocale($lcMessagesRequest) { // We must validate whether the locale is valid, otherwise setting a bad @@ -103,4 +107,5 @@ class I18nSubscriber implements EventSubscriberInterface { } } } + }