LeKoala\EmailTemplates\Helpers\FluentHelper
Helps providing base functionnalities where including subsite module is optional and yet provide a consistent api
TODO: externalize this to a specific module
Synopsis
class FluentHelper
{
- // members
- protected static $previousState;
- protected static $previousSubsite;
- protected static array $locale_cache = ;
- // methods
- public static bool usesFluent()
- public static boolean isClassTranslated()
- public static mixed withLocale()
- public static array withLocales()
- public static string get_locale_from_lang()
- public static string get_locale()
- public static string get_lang()
Members
protected
- $locale_cache — array
- $previousState — boolean
- $previousSubsite — int
Methods
public
- get_lang() — Make sure we get a proper two characters lang
- get_locale() — Get the right locale (using fluent data if exists)
- get_locale_from_lang() — Get a locale from the lang
- isClassTranslated()
- usesFluent() — Do we have the subsite module installed TODO: check if it might be better to use module manifest instead?
- withLocale() — Execute the callback in given subsite
- withLocales() — Execute the callback for all locales