mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
31 lines
521 B
PHP
31 lines
521 B
PHP
<?php
|
|
/**
|
|
* Hidden field.
|
|
* @package forms
|
|
* @subpackage fields-dataless
|
|
*/
|
|
class HiddenField extends FormField {
|
|
|
|
protected $template = 'HiddenField';
|
|
|
|
function FieldHolder($properties = array()) {
|
|
return $this->Field($properties);
|
|
}
|
|
|
|
function performReadonlyTransformation() {
|
|
$clone = clone $this;
|
|
$clone->setReadonly(true);
|
|
return $clone;
|
|
}
|
|
|
|
function IsHidden() {
|
|
return true;
|
|
}
|
|
|
|
function getAttributes() {
|
|
return array_merge(
|
|
parent::getAttributes(),
|
|
array('type' => 'hidden')
|
|
);
|
|
}
|
|
} |