mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
8331171f2c
Conflicts: .scrutinizer.yml admin/javascript/LeftAndMain.Panel.js core/startup/ParameterConfirmationToken.php dev/Debug.php dev/FixtureBlueprint.php docs/en/00_Getting_Started/05_Coding_Conventions.md docs/en/00_Getting_Started/index.md docs/en/02_Developer_Guides/01_Templates/01_Syntax.md filesystem/File.php filesystem/Folder.php forms/FieldList.php forms/LabelField.php forms/MoneyField.php forms/TextField.php forms/TreeDropdownField.php forms/Validator.php forms/gridfield/GridField.php forms/gridfield/GridFieldExportButton.php lang/de.yml lang/fi.yml model/DataObject.php model/SQLQuery.php parsers/ShortcodeParser.php security/ChangePasswordForm.php security/Security.php tests/control/DirectorTest.php tests/core/startup/ParameterConfirmationTokenTest.php tests/dev/FixtureBlueprintTest.php tests/forms/FieldListTest.php tests/forms/MoneyFieldTest.php tests/model/SQLQueryTest.php tests/security/SecurityTest.php
54 lines
771 B
PHP
54 lines
771 B
PHP
<?php
|
|
|
|
/**
|
|
* Hidden field.
|
|
*
|
|
* @package forms
|
|
* @subpackage fields-dataless
|
|
*/
|
|
class HiddenField extends FormField {
|
|
/**
|
|
* @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);
|
|
}
|
|
|
|
}
|