Property | Type | Description | |
---|---|---|---|
$data | array | The data associated with this template, accessible within the template itself. |
Method | Description | |
---|---|---|
__construct ( SimpleSAML_Configuration $configuration, string $template, string | null $defaultDictionary = null ) | Constructor | |
getAttributeTranslation ( $name ) : string | ||
getLanguage ( ) : string | ||
getLanguageCookie ( ) : null | string | ||
getTag ( $tag ) : array | ||
getTranslation ( $translations ) | Temporary wrapper for \SimpleSAML\Locale\Translate::getPreferredTranslation(). | |
getTranslator ( ) : |
Return the internal translator object used by this template. | |
includeInlineTranslation ( $tag, $translation ) | Wraps Translate->includeInlineTranslation() | |
includeLanguageFile ( $file, null $otherConfig = null ) | ||
lang_merge ( array $def, array $lang ) : array | Merge two translation arrays. | |
noop ( $tag ) | Behave like Language->noop to mark a tag for translation but actually do it later. | |
setLanguage ( $language, boolean $setLanguageCookie = true ) | ||
setLanguageCookie ( $language ) | ||
show ( ) | Show the template to the user. | |
t ( $tag, $replacements = [], $fallbackdefault = true, $oldreplacements = [], $striptags = false ) | Wrap Language->t to translate tag into the current language, with a fallback to english. |
Method | Description | |
---|---|---|
findModuleAndTemplateName ( string $template ) : array | Find module the template is in, if any | |
findModuleTemplateDirs ( ) | * Which enabled modules have templates? | |
findTemplatePath ( string $template, $throw_exception = true ) : string | Find template path. | |
findThemeTemplateDirs ( ) | * Add overriding templates in configured theme | |
generateLanguageBar ( ) : array | Generate an array for its use in the language bar, indexed by the ISO 639-2 codes of the languages available, containing their localized names and the URL that should be used in order to change to that language. | |
getLanguageList ( ) | Wraps Language->getLanguageList | |
includeAtTemplateBase ( $file ) | Includes a file relative to the template base directory. | |
isLanguageRTL ( ) | Wrap Language->isLanguageRTL | |
normalizeTemplateName ( string $templateName ) : string | Normalize the name of the template to one of the possible alternatives. | |
setupTwig ( ) | Setup twig. | |
setupTwigTemplatepaths ( ) : Twig_Loader_Filesystem | false | Set up the places where twig can look for templates. | |
twigDefaultContext ( ) | Set some default context |
public __construct ( SimpleSAML_Configuration $configuration, string $template, string | null $defaultDictionary = null ) | ||
$configuration | SimpleSAML_Configuration | Configuration object |
$template | string | Which template file to load |
$defaultDictionary | string | null | The default dictionary where tags will come from. |
public getAttributeTranslation ( $name ) : string | ||
$name | ||
return | string |
public static getLanguageCookie ( ) : null | string | ||
return | null | string |
public getTranslation ( $translations ) |
public getTranslator ( ) : |
||
return | The translator that will be used with this template. |
public includeInlineTranslation ( $tag, $translation ) |
public includeLanguageFile ( $file, null $otherConfig = null ) | ||
$file | ||
$otherConfig | null |
public static noop ( $tag ) |
public setLanguage ( $language, boolean $setLanguageCookie = true ) | ||
$language | ||
$setLanguageCookie | boolean |
public t ( $tag, $replacements = [], $fallbackdefault = true, $oldreplacements = [], $striptags = false ) |
public array $data | ||
return | array |