2007-07-19 10:40:28 +00:00
|
|
|
<?php
|
2015-04-28 09:08:51 +12:00
|
|
|
|
2016-08-19 10:51:35 +12:00
|
|
|
namespace SilverStripe\Forms;
|
|
|
|
|
2007-07-19 10:40:28 +00:00
|
|
|
/**
|
|
|
|
* Hidden field.
|
|
|
|
*/
|
2016-11-29 12:31:16 +13:00
|
|
|
class HiddenField extends FormField
|
|
|
|
{
|
|
|
|
|
|
|
|
protected $schemaDataType = FormField::SCHEMA_DATA_TYPE_HIDDEN;
|
|
|
|
|
2017-05-08 17:21:51 +12:00
|
|
|
protected $inputType = 'hidden';
|
|
|
|
|
2016-11-29 12:31:16 +13:00
|
|
|
/**
|
|
|
|
* @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;
|
|
|
|
}
|
|
|
|
|
|
|
|
function SmallFieldHolder($properties = array())
|
|
|
|
{
|
|
|
|
return $this->FieldHolder($properties);
|
|
|
|
}
|
2012-03-24 16:04:52 +13:00
|
|
|
}
|