silverstripe-framework/src/Forms/HiddenField.php

49 lines
798 B
PHP
Raw Normal View History

<?php
2015-04-27 23:08:51 +02:00
namespace SilverStripe\Forms;
/**
* Hidden field.
*/
2016-11-29 00:31:16 +01:00
class HiddenField extends FormField
{
protected $schemaDataType = FormField::SCHEMA_DATA_TYPE_HIDDEN;
protected $inputType = 'hidden';
2016-11-29 00:31:16 +01: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);
}
}