TextManager
in package
implements
TextManager
Class TextManager
Interfaces, Classes and Traits
- TextManager
- Interface TextManager
Table of Contents
- $defaultLanguageId : int
- $repository : TextPhraseRepository
- __construct() : mixed
- TextManager constructor.
- getPhraseText() : string
- Returns a translated text for the given phrase and section.
- getSectionPhrases() : array<string|int, string>
- Returns a list with translated texts of all phrases in the given section.
Properties
$defaultLanguageId
private
int
$defaultLanguageId
$repository
private
TextPhraseRepository
$repository
Methods
__construct()
TextManager constructor.
public
__construct(TextPhraseRepository $repository, UserPreferences $userPreferences) : mixed
Parameters
- $repository : TextPhraseRepository
- $userPreferences : UserPreferences
Return values
mixed —getPhraseText()
Returns a translated text for the given phrase and section.
public
getPhraseText(string $phrase, string $section[, int $languageId = null ]) : string
Parameters
- $phrase : string
- $section : string
- $languageId : int = null
Tags
Return values
string —getSectionPhrases()
Returns a list with translated texts of all phrases in the given section.
public
getSectionPhrases(string $section[, int $languageId = null ]) : array<string|int, string>
Parameters
- $section : string
- $languageId : int = null