diff --git a/core/includes/form.inc b/core/includes/form.inc index d5eaa54..0bffd39 100644 --- a/core/includes/form.inc +++ b/core/includes/form.inc @@ -18,30 +18,6 @@ use Symfony\Component\HttpFoundation\RedirectResponse; /** - * Fetches a form from the cache. - * - * @deprecated in Drupal 8.x-dev, will be removed before Drupal 8.0. - * Use \Drupal::formBuilder()->getCache(). - * - * @see \Drupal\Core\Form\FormCacheInterface::getCache(). - */ -function form_get_cache($form_build_id, FormStateInterface $form_state) { - return \Drupal::formBuilder()->getCache($form_build_id, $form_state); -} - -/** - * Stores a form in the cache. - * - * @deprecated in Drupal 8.x-dev, will be removed before Drupal 8.0. - * Use \Drupal::formBuilder()->setCache(). - * - * @see \Drupal\Core\Form\FormCacheInterface::setCache(). - */ -function form_set_cache($form_build_id, $form, FormStateInterface $form_state) { - \Drupal::formBuilder()->setCache($form_build_id, $form, $form_state); -} - -/** * Retrieves, populates, and processes a form. * * @deprecated in Drupal 8.x-dev, will be removed before Drupal 8.0. diff --git a/core/modules/system/src/Tests/Form/FormCacheTest.php b/core/modules/system/src/Tests/Form/FormCacheTest.php index 79bf680..2124404 100644 --- a/core/modules/system/src/Tests/Form/FormCacheTest.php +++ b/core/modules/system/src/Tests/Form/FormCacheTest.php @@ -61,7 +61,7 @@ function testCacheToken() { \Drupal::formBuilder()->setCache($this->form_build_id, $this->form, $this->form_state); $cached_form_state = new FormState(); - $cached_form = form_get_cache($this->form_build_id, $cached_form_state); + $cached_form = \Drupal::formBuilder()->getCache($this->form_build_id, $cached_form_state); $this->assertEqual($this->form['#property'], $cached_form['#property']); $this->assertTrue(!empty($cached_form['#cache_token']), 'Form has a cache token'); $this->assertEqual($this->form_state->get('example'), $cached_form_state->get('example')); diff --git a/core/modules/system/tests/modules/form_test/src/Controller/FormTestController.php b/core/modules/system/tests/modules/form_test/src/Controller/FormTestController.php index 1950076..89cfcc0 100644 --- a/core/modules/system/tests/modules/form_test/src/Controller/FormTestController.php +++ b/core/modules/system/tests/modules/form_test/src/Controller/FormTestController.php @@ -41,9 +41,10 @@ public function twoFormInstances() { * Emulate legacy AHAH-style ajax callback. * * Drupal 6 AHAH callbacks used to operate directly on forms retrieved using - * form_get_cache and stored using form_set_cache after manipulation. This - * callback helps testing whether \Drupal::formBuilder()->setCache() prevents - * resaving of immutable forms. + * \Drupal::formBuilder()->getCache() and stored using + * \Drupal::formBuilder()->setCache() after manipulation. This callback helps + * testing whether \Drupal::formBuilder()->setCache() prevents resaving of + * immutable forms. */ public function storageLegacyHandler($form_build_id) { $form_state = new FormState();