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


PHP FormField::setReadonly方法代码示例

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


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

示例1: 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);
     $this->fieldAmount->setReadonly($bool);
     $this->fieldCurrency->setReadonly($bool);
     return $this;
 }
开发者ID:miamollie,项目名称:echoAerial,代码行数:11,代码来源:MoneyField.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);
     $this->fieldPostcode->setReadonly($bool);
     $this->fieldCountry->setReadonly($bool);
     $this->fieldLatitude->setReadonly($bool);
     $this->fieldLongditude->setReadonly($bool);
 }
开发者ID:helpfulrobot,项目名称:andrelohmann-silverstripe-geoform,代码行数:12,代码来源:PostCodeLocationField.php

示例3: setReadonly

 public function setReadonly($bool)
 {
     parent::setReadonly($bool);
     if ($bool) {
         foreach ($this->composite_fields as $field) {
             $field->performReadonlyTransformation();
         }
     }
 }
开发者ID:helpfulrobot,项目名称:briceburg-silverstripe-flexichoice,代码行数:9,代码来源:FlexiChoiceField.php

示例4: 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

示例5: setReadonly

 public function setReadonly($readonly)
 {
     parent::setReadonly($readonly);
     foreach ($this->getChildren() as $child) {
         $child->setReadonly($readonly);
     }
     return $this;
 }
开发者ID:jacobbuck,项目名称:silverstripe-framework,代码行数:8,代码来源:CompositeField.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());
 }
开发者ID:jakedaleweb,项目名称:AtomCodeChallenge,代码行数:8,代码来源:FormFieldTest.php

示例7: setReadonly

 function setReadonly($bool)
 {
     parent::setReadonly($bool);
     $this->dateField->setReadonly($bool);
     $this->timeField->setReadonly($bool);
     if ($this->timezoneField) {
         $this->timezoneField->setReadonly($bool);
     }
     return $this;
 }
开发者ID:prostart,项目名称:cobblestonepath,代码行数:10,代码来源:DatetimeField.php

示例8: 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();
         $this->fieldTitle = $this->fieldTitle->performReadonlyTransformation();
         $this->fieldLinkmode = $this->fieldLinkmode->performReadonlyTransformation();
     }
 }
开发者ID:helpfulrobot,项目名称:micschk-silverstripe-namedlinkfield,代码行数:14,代码来源:NamedLinkFormField.php

示例9: 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

示例10: 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


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