本文整理汇总了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();
}
}
示例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();
}
}
示例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();
}
}
示例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();
}
}
示例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;
}
示例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());
}
示例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;
}