本文整理汇总了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;
}
示例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);
}
示例3: setReadonly
public function setReadonly($bool)
{
parent::setReadonly($bool);
if ($bool) {
foreach ($this->composite_fields as $field) {
$field->performReadonlyTransformation();
}
}
}
示例4: setReadonly
/**
*/
function setReadonly($bool)
{
parent::setReadonly($bool);
if ($bool) {
$this->fieldFindBuyable = $this->fieldFindBuyable->performReadonlyTransformation();
$this->fieldSelectedBuyable = $this->fieldSelectedBuyable->performReadonlyTransformation();
}
}
示例5: setReadonly
public function setReadonly($readonly)
{
parent::setReadonly($readonly);
foreach ($this->getChildren() as $child) {
$child->setReadonly($readonly);
}
return $this;
}
示例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());
}
示例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;
}
示例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();
}
}
示例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();
}
}
示例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());
}