PHP Trait RainLab\Translate\Traits\MLControl

Author: Alexey Bobkov, Samuel Georges
Afficher le fichier Open project: rainlab/translate-plugin

Méthodes publiques

Свойство Type Description
$isAvailable Determines whether translation services are available

Protected Properties

Свойство Type Description
$defaultLocale Object
$parentViewPath Specifies a path to the views directory.

Méthodes publiques

Méthode Description
getFallbackType ( ) : string Returns the fallback field type.
getLocaleSaveData ( ) : array Returns an array of translated values for this field
getLocaleSaveValue ( $value ) {@inheritDoc}
getLocaleValue ( string $locale ) : string Returns a translated value for a given locale.
initLocale ( ) : void Initialize control
isLocaleFieldJsonable ( ) : boolean Returns true if widget is a repeater, or the field is specified as jsonable in the model.
loadLocaleAssets ( ) Loads assets specific to ML Controls
makeParentPartial ( string $partial, array $params = [] ) : string Used by child classes to render in context of this view path.
prepareLocaleVars ( ) Prepares the list data
renderFallbackField ( ) {@inheritDoc}

Méthodes protégées

Méthode Description
makeRenderFormField ( ) If translation is unavailable, render the original field type (text).

Method Details

getFallbackType() public méthode

Returns the fallback field type.
public getFallbackType ( ) : string
Résultat string

getLocaleSaveData() public méthode

Returns an array of translated values for this field
public getLocaleSaveData ( ) : array
Résultat array

getLocaleSaveValue() public méthode

{@inheritDoc}
public getLocaleSaveValue ( $value )

getLocaleValue() public méthode

Returns a translated value for a given locale.
public getLocaleValue ( string $locale ) : string
$locale string
Résultat string

initLocale() public méthode

Initialize control
public initLocale ( ) : void
Résultat void

isLocaleFieldJsonable() public méthode

Returns true if widget is a repeater, or the field is specified as jsonable in the model.
public isLocaleFieldJsonable ( ) : boolean
Résultat boolean

loadLocaleAssets() public méthode

Loads assets specific to ML Controls
public loadLocaleAssets ( )

makeParentPartial() public méthode

Used by child classes to render in context of this view path.
public makeParentPartial ( string $partial, array $params = [] ) : string
$partial string The view to load.
$params array Parameter variables to pass to the view.
Résultat string The view contents.

makeRenderFormField() protected méthode

If translation is unavailable, render the original field type (text).
protected makeRenderFormField ( )

prepareLocaleVars() public méthode

Prepares the list data
public prepareLocaleVars ( )

renderFallbackField() public méthode

{@inheritDoc}
public renderFallbackField ( )

Property Details

$defaultLocale protected_oe property

Object
protected $defaultLocale

$isAvailable public_oe property

Determines whether translation services are available
public $isAvailable

$parentViewPath protected_oe property

Specifies a path to the views directory.
protected $parentViewPath