Skip to content

Commit

Permalink
feat(locale admin): add hook to update fluent locales
Browse files Browse the repository at this point in the history
  • Loading branch information
oliver-norden authored Oct 18, 2021
1 parent e0578bd commit 7acbe4e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Control/LocaleAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@ public function getClientConfig()
/** @var Member|FluentMemberExtension $member */
$member = Security::getCurrentUser();
$locales = $member
? $member->getCMSAccessLocales()->toArray()
: Locale::getCached()->toArray();
? $member->getCMSAccessLocales()
: Locale::getCached();
$this->extend('updateFluentLocales', $locales);
$locales = $locales->toArray();
return array_merge(
parent::getClientConfig(),
[
Expand Down

0 comments on commit 7acbe4e

Please sign in to comment.