mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-08-28 13:36:12 +02:00
57 lines
840 B
PHP
57 lines
840 B
PHP
<?php
|
|
|
|
/**
|
|
* Hidden field.
|
|
*
|
|
* @package forms
|
|
* @subpackage fields-dataless
|
|
*/
|
|
class HiddenField extends FormField {
|
|
|
|
protected $schemaDataType = FormField::SCHEMA_DATA_TYPE_HIDDEN;
|
|
|
|
/**
|
|
* @param array $properties
|
|
*
|
|
* @return HTMLText
|
|
*/
|
|
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);
|
|
}
|
|
|
|
}
|