diff --git a/core/lib/Drupal/Core/Form/FormState.php b/core/lib/Drupal/Core/Form/FormState.php
index b204d77..971be2a 100644
--- a/core/lib/Drupal/Core/Form/FormState.php
+++ b/core/lib/Drupal/Core/Form/FormState.php
@@ -714,6 +714,31 @@ public function getTemporary() {
   /**
    * {@inheritdoc}
    */
+  public function &getTemporaryValue($key) {
+    $value = &NestedArray::getValue($this->temporary, (array) $key);
+    return $value;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function setTemporaryValue($key, $value) {
+    NestedArray::setValue($this->temporary, (array) $key, $value, TRUE);
+    return $this;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function hasTemporaryValue($key) {
+    $exists = NULL;
+    NestedArray::getValue($this->temporary, (array) $key, $exists);
+    return $exists;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
   public function setTriggeringElement($triggering_element) {
     $this->triggering_element = $triggering_element;
     return $this;
diff --git a/core/lib/Drupal/Core/Form/FormStateInterface.php b/core/lib/Drupal/Core/Form/FormStateInterface.php
index 8a544df..8b6a02a 100644
--- a/core/lib/Drupal/Core/Form/FormStateInterface.php
+++ b/core/lib/Drupal/Core/Form/FormStateInterface.php
@@ -934,6 +934,47 @@ public function setTemporary(array $temporary);
   public function getTemporary();
 
   /**
+   * Gets an arbitrary value from temporary storage.
+   *
+   * @param string|array $key
+   *   Properties are often stored as multi-dimensional associative arrays. If
+   *   $key is a string, it will return $temporary[$key]. If $key is an array,
+   *   each element of the array will be used as a nested key. If
+   *   $key = ['foo', 'bar'] it will return $temporary['foo']['bar'].
+   *
+   * @return mixed
+   *   A reference to the value for that key, or NULL if the property does
+   *   not exist.
+   */
+  public function &getTemporaryValue($key);
+
+  /**
+   * Sets an arbitrary value in temporary storage.
+   *
+   * @param string|array $key
+   *   Properties are often stored as multi-dimensional associative arrays. If
+   *   $key is a string, it will use $temporary[$key] = $value. If $key is an
+   *   array, each element of the array will be used as a nested key. If
+   *   $key = ['foo', 'bar'] it will use $temporary['foo']['bar'] = $value.
+   * @param mixed $value
+   *   The value to set.
+   *
+   * @return $this
+   */
+  public function setTemporaryValue($key, $value);
+
+  /**
+   * Determines if a temporary value is present.
+   *
+   * @param string $key
+   *   Properties are often stored as multi-dimensional associative arrays. If
+   *   $key is a string, it will return isset($temporary[$key]). If $key is an
+   *   array, each element of the array will be used as a nested key. If
+   *   $key = ['foo', 'bar'] it will return isset($temporary['foo']['bar']).
+   */
+  public function hasTemporaryValue($key);
+
+  /**
    * Sets the form element that triggered submission.
    *
    * @param array|null $triggering_element
