getLoadData -> getLoadValue

This commit is contained in:
Samuel Georges 2015-01-05 09:45:04 +11:00
parent 0be582c42d
commit d91d4112a5
7 changed files with 7 additions and 7 deletions

View File

@ -101,7 +101,7 @@ abstract class FormWidgetBase extends WidgetBase
* supports nesting via HTML array.
* @return string
*/
public function getLoadData()
public function getLoadValue()
{
list($model, $attribute) = $this->getModelArrayAttribute($this->valueFrom);

View File

@ -106,7 +106,7 @@ class CodeEditor extends FormWidgetBase
$this->vars['stretch'] = $this->formField->stretch;
$this->vars['size'] = $this->formField->size;
$this->vars['name'] = $this->formField->getName();
$this->vars['value'] = $this->getLoadData();
$this->vars['value'] = $this->getLoadValue();
}
/**

View File

@ -55,7 +55,7 @@ class ColorPicker extends FormWidgetBase
public function prepareVars()
{
$this->vars['name'] = $this->formField->getName();
$this->vars['value'] = $value = $this->getLoadData();
$this->vars['value'] = $value = $this->getLoadValue();
$this->vars['availableColors'] = $this->availableColors;
$this->vars['isCustomColor'] = !in_array($value, $this->availableColors);
}

View File

@ -87,7 +87,7 @@ class DataTable extends FormWidgetBase
protected function populateTableWidget()
{
$dataSource = $this->table->getDataSource();
$records = $this->getLoadData() ?: [];
$records = $this->getLoadValue() ?: [];
$dataSource->initRecords((array) $records);
}

View File

@ -62,7 +62,7 @@ class DatePicker extends FormWidgetBase
$this->vars['timeName'] = self::TIME_PREFIX.$this->formField->getName(false);
$this->vars['timeValue'] = null;
if ($value = $this->getLoadData()) {
if ($value = $this->getLoadValue()) {
/*
* Date / Time

View File

@ -143,7 +143,7 @@ class RecordFinder extends FormWidgetBase
public function prepareVars()
{
// This should be a relation and return a Model
$this->relationModel = $this->getLoadData();
$this->relationModel = $this->getLoadValue();
$this->vars['value'] = $this->getKeyValue();
$this->vars['field'] = $this->formField;

View File

@ -41,7 +41,7 @@ class RichEditor extends FormWidgetBase
$this->vars['stretch'] = $this->formField->stretch;
$this->vars['size'] = $this->formField->size;
$this->vars['name'] = $this->formField->getName();
$this->vars['value'] = $this->getLoadData();
$this->vars['value'] = $this->getLoadValue();
}
/**