diff --git a/core/lib/Drupal/Core/Form/FormState.php b/core/lib/Drupal/Core/Form/FormState.php index 00fcec2..eb24109 100644 --- a/core/lib/Drupal/Core/Form/FormState.php +++ b/core/lib/Drupal/Core/Form/FormState.php @@ -664,7 +664,7 @@ public function addRebuildInfo($property, $value) { /** * {@inheritdoc} */ - public function setStorage($storage) { + public function setStorage(array $storage) { $this->storage = $storage; return $this; } @@ -672,7 +672,7 @@ public function setStorage($storage) { /** * {@inheritdoc} */ - public function getStorage() { + public function &getStorage() { return $this->storage; } diff --git a/core/lib/Drupal/Core/Form/FormStateInterface.php b/core/lib/Drupal/Core/Form/FormStateInterface.php index 626ce34..f58322e 100644 --- a/core/lib/Drupal/Core/Form/FormStateInterface.php +++ b/core/lib/Drupal/Core/Form/FormStateInterface.php @@ -164,6 +164,24 @@ public function setRedirectUrl(Url $url); public function getRedirect(); /** + * Sets the entire set of arbitrary data. + * + * @param array $storage + * The entire set of arbitrary data to store for this form. + * + * @return $this + */ + public function setStorage(array $storage); + + /** + * Returns the entire set of arbitrary data. + * + * @return array + * The entire set of arbitrary data to store for this form. + */ + public function &getStorage(); + + /** * Gets any arbitrary property. * * @param string|array $property