silverstripe-framework/Forms/HiddenField.php
Damian Mooyman 8dd644d25d
API Namespace all classes
Namespace all templates
Move difflib and BBCodeParser2 to thirdparty
Remove deprecated API marked for removal in 4.0
2016-09-08 10:23:17 +12:00

55 lines
813 B
PHP

<?php
namespace SilverStripe\Forms;
/**
* Hidden field.
*/
class HiddenField extends FormField {
protected $schemaDataType = FormField::SCHEMA_DATA_TYPE_HIDDEN;
/**
* @param array $properties
* @return string
*/
public function FieldHolder($properties = array()) {
return $this->Field($properties);
}
/**
* @return static
*/
public function performReadonlyTransformation() {
$clone = clone $this;
$clone->setReadonly(true);
return $clone;
}
/**
* @return bool
*/
public function IsHidden() {
return true;
}
/**
* {@inheritdoc}
*/
public function getAttributes() {
return array_merge(
parent::getAttributes(),
array(
'type' => 'hidden',
)
);
}
function SmallFieldHolder($properties = array()) {
return $this->FieldHolder($properties);
}
}