PHP Class FluidTYPO3\Vhs\ViewHelpers\Resource\LanguageViewHelper

Reads a certain language file with returning not just one single label, but all the translated labels. ### Examples
Inheritance: extends TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper, use trait FluidTYPO3\Vhs\Traits\TemplateVariableViewHelperTrait
Afficher le fichier Open project: fluidtypo3/vhs

Méthodes publiques

Méthode Description
initializeArguments ( ) : void Registers all arguments for this ViewHelper.
render ( ) : array | string The main render method of this ViewHelper.

Méthodes protégées

Méthode Description
getInitializedLanguage ( ) : string Gets the key of current initialized language or fallback to 'default'.
getLabelsByLanguageKey ( array $locallang, string $languageKey ) : array Gets the translated labels by a specific language key or fallback to 'default'.
getLabelsFromTarget ( array $labels ) : array Simplify label array with just taking the value from target.
getLanguageKey ( ) : string Gets the language key from arguments or from current initialized language if argument is not defined.
getResolvedExtensionName ( ) : string Gets the extension name from defined argument or tries to resolve it from the controller context if not set.
getResolvedPath ( ) : string Gets the resolved file path with trying to resolve relative paths even if no extension key is defined.

Method Details

getInitializedLanguage() protected méthode

Gets the key of current initialized language or fallback to 'default'.
protected getInitializedLanguage ( ) : string
Résultat string

getLabelsByLanguageKey() protected méthode

Gets the translated labels by a specific language key or fallback to 'default'.
protected getLabelsByLanguageKey ( array $locallang, string $languageKey ) : array
$locallang array
$languageKey string
Résultat array

getLabelsFromTarget() protected méthode

Simplify label array with just taking the value from target.
protected getLabelsFromTarget ( array $labels ) : array
$labels array
Résultat array

getLanguageKey() protected méthode

Gets the language key from arguments or from current initialized language if argument is not defined.
protected getLanguageKey ( ) : string
Résultat string

getResolvedExtensionName() protected méthode

Gets the extension name from defined argument or tries to resolve it from the controller context if not set.
protected getResolvedExtensionName ( ) : string
Résultat string

getResolvedPath() protected méthode

Gets the resolved file path with trying to resolve relative paths even if no extension key is defined.
protected getResolvedPath ( ) : string
Résultat string

initializeArguments() public méthode

Registers all arguments for this ViewHelper.
public initializeArguments ( ) : void
Résultat void

render() public méthode

The main render method of this ViewHelper.
public render ( ) : array | string
Résultat array | string