当前位置: 首页>>代码示例>>PHP>>正文


PHP FormField::dataValue方法代码示例

本文整理汇总了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;
 }
开发者ID:helpfulrobot,项目名称:betterbrief-silverstripe-googlemapfield,代码行数:11,代码来源:GoogleMapField.php

示例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;
 }
开发者ID:miamollie,项目名称:echoAerial,代码行数:12,代码来源:MoneyField.php

示例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);
 }
开发者ID:zarocknz,项目名称:silverstripe-geodata-uploadfield,代码行数:15,代码来源:GeodataUploadField.php

示例4: saveInto

 /**
  * {@inheritdoc}
  */
 public function saveInto(DataObjectInterface $record)
 {
     if ($this->name) {
         $record->setCastedField($this->name, $this->geometryField->dataValue());
     }
 }
开发者ID:helpfulrobot,项目名称:benmanu-silverstripe-leafletfield,代码行数:9,代码来源:LeafletField.php


注:本文中的FormField::dataValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。