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


PHP FormField::performReadonlyTransformation方法代码示例

本文整理汇总了PHP中FormField::performReadonlyTransformation方法的典型用法代码示例。如果您正苦于以下问题:PHP FormField::performReadonlyTransformation方法的具体用法?PHP FormField::performReadonlyTransformation怎么用?PHP FormField::performReadonlyTransformation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FormField的用法示例。


在下文中一共展示了FormField::performReadonlyTransformation方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setReadonly

 /**
  */
 function setReadonly($bool)
 {
     parent::setReadonly($bool);
     if ($bool) {
         $this->fieldFindBuyable = $this->fieldFindBuyable->performReadonlyTransformation();
         $this->fieldSelectedBuyable = $this->fieldSelectedBuyable->performReadonlyTransformation();
     }
 }
开发者ID:nieku,项目名称:silverstripe-ecommerce,代码行数:10,代码来源:BuyableSelectField.php

示例2: setReadonly

 /**
  * @todo Implement removal of readonly state with $bool=false
  * @todo Set readonly state whenever field is recreated, e.g. in setAllowedCurrencies()
  */
 public function setReadonly($bool)
 {
     parent::setReadonly($bool);
     if ($bool) {
         $this->fieldPageID = $this->fieldPageID->performReadonlyTransformation();
         $this->fieldCustomURL = $this->fieldCustomURL->performReadonlyTransformation();
     }
 }
开发者ID:helpfulrobot,项目名称:lrc-silverstripe-link-field,代码行数:12,代码来源:LinkFormField.php

示例3: setReadonly

 /**
  * @todo Implement removal of readonly state with $bool=false
  * @todo Set readonly state whenever field is recreated, e.g. in setAllowedCurrencies()
  */
 function setReadonly($bool)
 {
     parent::setReadonly($bool);
     if ($bool) {
         $this->fieldAddress = $this->fieldAddress->performReadonlyTransformation();
         $this->fieldLatitude = $this->fieldLatitude->performReadonlyTransformation();
         $this->fieldLongditude = $this->fieldLongditude->performReadonlyTransformation();
     }
 }
开发者ID:helpfulrobot,项目名称:andrelohmann-silverstripe-geoform,代码行数:13,代码来源:BackendGeoLocationField.php

示例4: setReadonly

 /**
  * @todo Implement removal of readonly state with $bool=false
  * @todo Set readonly state whenever field is recreated, e.g. in setAllowedCurrencies()
  */
 public function setReadonly($bool)
 {
     parent::setReadonly($bool);
     if ($bool) {
         $this->fieldPageID = $this->fieldPageID->performReadonlyTransformation();
         $this->fieldPageAnchor = $this->fieldPageAnchor->performReadonlyTransformation();
         $this->fieldCustomURL = $this->fieldCustomURL->performReadonlyTransformation();
         $this->fieldShortcode = $this->fieldShortcode->performReadonlyTransformation();
         $this->fieldFileID = $this->fieldFileID->performReadonlyTransformation();
         $this->fieldTitle = $this->fieldTitle->performReadonlyTransformation();
         $this->fieldLinkmode = $this->fieldLinkmode->performReadonlyTransformation();
     }
 }
开发者ID:micschk,项目名称:silverstripe-namedlinkfield,代码行数:17,代码来源:NamedLinkFormField.php

示例5: performReadonlyTransformation

 public function performReadonlyTransformation()
 {
     $field = parent::performReadonlyTransformation();
     $field->setValue($this->dataValue());
     $dateFieldConfig = $this->getDateField()->getConfig();
     if ($dateFieldConfig) {
         foreach ($dateFieldConfig as $k => $v) {
             $field->getDateField()->setConfig($k, $v);
         }
     }
     $timeFieldConfig = $this->getTimeField()->getConfig();
     if ($timeFieldConfig) {
         foreach ($timeFieldConfig as $k => $v) {
             $field->getTimeField()->setConfig($k, $v);
         }
     }
     return $field;
 }
开发者ID:ntd,项目名称:sapphire,代码行数:18,代码来源:DatetimeField.php

示例6: testReadonly

 public function testReadonly()
 {
     $field = new FormField('MyField');
     $field->setReadonly(true);
     $this->assertContains('readonly="readonly"', $field->getAttributesHTML());
     $field->setReadonly(false);
     $this->assertNotContains('readonly="readonly"', $field->getAttributesHTML());
     $this->assertInstanceOf('FormField', $field->performReadonlyTransformation());
     eval("class FormField_Readonly extends FormField {}");
     $this->assertInstanceOf('FormField_Readonly', $field->performReadonlyTransformation());
 }
开发者ID:ntd,项目名称:sapphire,代码行数:11,代码来源:FormFieldTest.php

示例7: performReadonlyTransformation

 /**
  * Changes this field to the readonly field.
  */
 public function performReadonlyTransformation()
 {
     $copy = parent::performReadonlyTransformation();
     $copy->setKeyField($this->keyField);
     $copy->setLabelField($this->labelField);
     $copy->setSourceObject($this->sourceObject);
     return $copy;
 }
开发者ID:ntd,项目名称:sapphire,代码行数:11,代码来源:TreeDropdownField.php


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