LanguageController final readonly class
Minn\Admin\LanguageController · public/minn/src/Minn/Admin/LanguageController.php · 98 lines
Languages: what is installed, what a person reads in, what the site defaults to.
Uses 13
Used by 1
Constants and properties
| private | readonly Minn\Admin\Translations $translations | Promoted from the constructor. |
| private | readonly Minn\Content\Users $users | Promoted from the constructor. |
| private | readonly Minn\Content\Site $site | Promoted from the constructor. |
| private | readonly Minn\Auth\Capabilities $capabilities | Promoted from the constructor. |
| private | readonly Minn\Rest\Caller $caller | Promoted from the constructor. |
Public
| new | __construct(Minn\Admin\Translations $translations, Minn\Content\Users $users, Minn\Content\Site $site, Minn\Auth\Capabilities $capabilities, Minn\Rest\Caller $caller)# | |
| method | languages(Minn\Http\Request $request): Minn\Http\ResponseGET /minn-admin/v1/languages (floor edit_posts)# | The languages a user may pick, installed and available. |
| method | bootLocale(Minn\Http\Request $request): Minn\Http\ResponseGET /minn-admin/v1/boot-locale (floor edit_posts)# | The slice of the boot payload a language switch repaints from. |
| method | mine(Minn\Http\Request $request): Minn\Http\ResponsePOST /minn-admin/v1/me/language (floor edit_posts)# | Sets the caller's own locale. |
| method | user(Minn\Http\Request $request, string $id): Minn\Http\ResponsePOST /minn-admin/v1/users/{id:\d+}/language (floor edit_posts)# | Sets another user's locale. |
| method | site(Minn\Http\Request $request): Minn\Http\ResponsePOST /minn-admin/v1/site/language (floor edit_posts + manage_options)# | Sets the site's locale. |
Internals 2
Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.
Nothing matches.