PHP Class RainLab\Translate\Classes\EventRegistry

Author: Alexey Bobkov, Samuel Georges
Inheritance: use trait October\Rain\Support\Traits\Singleton
Mostrar archivo Open project: rainlab/translate-plugin Class Usage Examples

Public Methods

Method Description
findTranslatedContentFile ( $controller, $fileName ) : string | null Adds language suffixes to content files.
importMessagesFromTheme ( ) Import messages defined by the theme
pruneTranslatedContentTemplates ( October\Rain\Database\Collection $templates ) : October\Rain\Database\Collection Removes localized content files from templates collection
registerFormFieldReplacements ( $widget )
registerModelTranslation ( $widget ) Automatically replace form fields for multi lingual equivalents
registerPageUrlTranslation ( $widget )
setMessageContext ( $page ) Set the page context for translation caching.

Protected Methods

Method Description
processFormMLFields ( array $fields, Model $model ) : array Helper function to replace standard fields with multi lingual equivalents

Method Details

findTranslatedContentFile() public method

Adds language suffixes to content files.
public findTranslatedContentFile ( $controller, $fileName ) : string | null
return string | null

importMessagesFromTheme() public method

Import messages defined by the theme

processFormMLFields() protected method

Helper function to replace standard fields with multi lingual equivalents
protected processFormMLFields ( array $fields, Model $model ) : array
$fields array
$model Model
return array

pruneTranslatedContentTemplates() public method

Removes localized content files from templates collection
public pruneTranslatedContentTemplates ( October\Rain\Database\Collection $templates ) : October\Rain\Database\Collection
$templates October\Rain\Database\Collection
return October\Rain\Database\Collection

registerFormFieldReplacements() public method

public registerFormFieldReplacements ( $widget )

registerModelTranslation() public method

Automatically replace form fields for multi lingual equivalents
public registerModelTranslation ( $widget )

registerPageUrlTranslation() public method

public registerPageUrlTranslation ( $widget )

setMessageContext() public method

Set the page context for translation caching.
public setMessageContext ( $page )