mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-08-26 20:45:47 +02:00
36 lines
613 B
PHP
36 lines
613 B
PHP
<?php
|
|
/**
|
|
* Hidden field.
|
|
*
|
|
* @package forms
|
|
* @subpackage fields-dataless
|
|
*/
|
|
class HiddenField extends FormField {
|
|
|
|
public function FieldHolder($properties = array()) {
|
|
return $this->Field($properties);
|
|
}
|
|
|
|
public function performReadonlyTransformation() {
|
|
$clone = clone $this;
|
|
$clone->setReadonly(true);
|
|
return $clone;
|
|
}
|
|
|
|
public function IsHidden() {
|
|
return true;
|
|
}
|
|
|
|
public function getAttributes() {
|
|
return array_merge(
|
|
parent::getAttributes(),
|
|
array('type' => 'hidden')
|
|
);
|
|
}
|
|
|
|
function SmallFieldHolder($properties = array()) {
|
|
return $this->FieldHolder($properties);
|
|
}
|
|
|
|
}
|