PHP Class RainLab\Translate\Classes\MLContent

Author: Alexey Bobkov, Samuel Georges
Inheritance: extends MLCmsObject
Show file Open project: rainlab/translate-plugin

Public Methods

Method Description
findLocale ( $locale, $page )
getObjectTypeDirName ( ) : string Returns the directory name corresponding to the object type.
setFileNameAttribute ( mixed $value ) Splice in the locale when setting the file name.

Protected Methods

Method Description
addLocaleToFileName ( $fileName, $locale ) Splice the active locale in to the filename - content.htm -> content.en.htm

Method Details

addLocaleToFileName() protected static method

Splice the active locale in to the filename - content.htm -> content.en.htm
protected static addLocaleToFileName ( $fileName, $locale )

findLocale() public static method

public static findLocale ( $locale, $page )

getObjectTypeDirName() public method

Content does not use localized sub directories, but as file suffix instead.
public getObjectTypeDirName ( ) : string
return string

setFileNameAttribute() public method

Splice in the locale when setting the file name.
public setFileNameAttribute ( mixed $value )
$value mixed