本文整理汇总了PHP中FormField::dataValue方法的典型用法代码示例。如果您正苦于以下问题:PHP FormField::dataValue方法的具体用法?PHP FormField::dataValue怎么用?PHP FormField::dataValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FormField
的用法示例。
在下文中一共展示了FormField::dataValue方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: saveInto
/**
* Take the latitude/longitude fields and save them to the DataObject.
* {@inheritdoc}
*/
public function saveInto(DataObjectInterface $record)
{
$record->setCastedField($this->childFieldName('Latitude'), $this->latField->dataValue());
$record->setCastedField($this->childFieldName('Longitude'), $this->lngField->dataValue());
$record->setCastedField($this->childFieldName('Zoom'), $this->zoomField->dataValue());
return $this;
}
示例2: setAllowedCurrencies
/**
* @param array $arr
*/
public function setAllowedCurrencies($arr)
{
$this->allowedCurrencies = $arr;
// @todo Has to be done twice in case allowed currencies changed since construction
$oldVal = $this->fieldCurrency->dataValue();
$this->fieldCurrency = $this->FieldCurrency($this->name);
$this->fieldCurrency->setValue($oldVal);
return $this;
}
示例3: saveInto
/**
* Called before the dataobject record is saved.
* @param DataObjectInterface $record The record.
* @return [type] [description]
*/
public function saveInto(DataObjectInterface $record)
{
// On the dataobject record set the lat, long, zoom fields (names specified by the dev at
// time of construction) to the values of the lat long and zoom child fields of this class.
$record->setCastedField($this->latFieldName, $this->latField->dataValue());
$record->setCastedField($this->lngFieldName, $this->lngField->dataValue());
$record->setCastedField($this->zoomFieldName, $this->zoomField->dataValue());
// Do parent stuff as normal.
return parent::saveInto($record);
}
示例4: saveInto
/**
* {@inheritdoc}
*/
public function saveInto(DataObjectInterface $record)
{
if ($this->name) {
$record->setCastedField($this->name, $this->geometryField->dataValue());
}
}