From f1524d9d31665cf8c0811ecdb2e7012a0d54e601 Mon Sep 17 00:00:00 2001 From: Christopher Pitt Date: Tue, 28 Apr 2015 09:08:51 +1200 Subject: [PATCH] Clean up HiddenField --- forms/HiddenField.php | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/forms/HiddenField.php b/forms/HiddenField.php index 12495f202..831c5573c 100644 --- a/forms/HiddenField.php +++ b/forms/HiddenField.php @@ -1,4 +1,5 @@ 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') + array( + 'type' => 'hidden', + ) ); } }