Documentation

TranslationsMiddlewareImpl extends TranslationsMiddleware
in package
Uses UtilsProvider

See `TranslationsMiddleware`.

Table of Contents

Properties

$consumer  : mixed
$suspended  : mixed

Methods

__construct()  : mixed
C'tor.
beforePersistTemplate()  : void
Before persisting the template instance to the storage we can modify it.
beforeRetrievingTemplate()  : void
Before the template got read through `retrieve` or `retrieveBy`.
beforeUsingTemplate()  : void
Before using the template (e.g. expose it to the frontend UI form) we can modify it.
fetchTranslations()  : array<string|int, array<string|int, mixed>>
Fetch available translations with the following array scheme:
getConsumer()  : mixed
Getter.
getPluginConstantPrefix()  : string
Get the prefix of this plugin so composer packages can dynamically build other constant values on it.
getVariableResolver()  : mixed
Getter.
isSuspended()  : mixed
Check if the middleware is suspended.
suspend()  : mixed
Allows to suspend or resume the middleware to take effect. This is efficient if a middleware could be called recursively.

Properties

Methods

fetchTranslations()

Fetch available translations with the following array scheme:

public fetchTranslations(mixed $template) : array<string|int, array<string|int, mixed>>
[
     ['isUntranslated' => false, 'language' => 'de_DE', 'name' => 'German'],
     ...
]

name can be optional.

Parameters
$template : mixed
Return values
array<string|int, array<string|int, mixed>>

getPluginConstantPrefix()

Get the prefix of this plugin so composer packages can dynamically build other constant values on it.

public getPluginConstantPrefix() : string
Tags
codeCoverageIgnore

It only returns a string with the constant prefix

Return values
string

getVariableResolver()

Getter.

public getVariableResolver() : mixed
Tags
codeCoverageIgnore

isSuspended()

Check if the middleware is suspended.

public isSuspended() : mixed

suspend()

Allows to suspend or resume the middleware to take effect. This is efficient if a middleware could be called recursively.

public suspend(bool $state) : mixed
Parameters
$state : bool

        
On this page

Search results