PHP Class RainLab\Translate\FormWidgets\MLRepeater

Author: Alexey Bobkov, Samuel Georges
Inheritance: extends Backend\FormWidgets\Repeater, use trait RainLab\Translate\Traits\MLControl
Mostra file Open project: rainlab/translate-plugin

Public Properties

Property Type Description
$originalAssetPath
$originalViewPath

Protected Properties

Property Type Description
$defaultAlias {@inheritDoc}

Public Methods

Method Description
getSaveValue ( $value ) : array Returns an array of translated values for this field
init ( ) {@inheritDoc}
onAddItem ( )
onSwitchItemLocale ( )
prepareVars ( )
render ( ) {@inheritDoc}

Protected Methods

Method Description
actAsParent ( $switch = true )
getLocaleSaveDataAsArray ( $locale ) : array Returns the stored locale data as an array.
getPrimarySaveDataAsArray ( ) : array Gets the active values from the selected locale.
loadAssets ( ) {@inheritDoc}
reprocessExistingLocaleItems ( $data ) : void Recreates form widgets based on number of repeater items.
rewritePostValues ( ) : void Since the locker does always contain the latest values, this method will take the save data from the repeater and merge it in to the locker based on which ever locale is selected using an item map

Method Details

actAsParent() protected method

protected actAsParent ( $switch = true )

getLocaleSaveDataAsArray() protected method

Returns the stored locale data as an array.
protected getLocaleSaveDataAsArray ( $locale ) : array
return array

getPrimarySaveDataAsArray() protected method

Gets the active values from the selected locale.
protected getPrimarySaveDataAsArray ( ) : array
return array

getSaveValue() public method

Returns an array of translated values for this field
public getSaveValue ( $value ) : array
return array

init() public method

{@inheritDoc}
public init ( )

loadAssets() protected method

{@inheritDoc}
protected loadAssets ( )

onAddItem() public method

public onAddItem ( )

onSwitchItemLocale() public method

public onSwitchItemLocale ( )

prepareVars() public method

public prepareVars ( )

render() public method

{@inheritDoc}
public render ( )

reprocessExistingLocaleItems() protected method

Recreates form widgets based on number of repeater items.
protected reprocessExistingLocaleItems ( $data ) : void
return void

rewritePostValues() protected method

Since the locker does always contain the latest values, this method will take the save data from the repeater and merge it in to the locker based on which ever locale is selected using an item map
protected rewritePostValues ( ) : void
return void

Property Details

$defaultAlias protected_oe property

{@inheritDoc}
protected $defaultAlias

$originalAssetPath public_oe property

public $originalAssetPath

$originalViewPath public_oe property

public $originalViewPath