silverstripe-framework/forms/HiddenField.php

31 lines
514 B
PHP
Raw Normal View History

<?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')
);
}
}