summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDries2013-11-18 01:27:35 (GMT)
committerDries2013-11-18 01:27:35 (GMT)
commit9c306c1cb68c49634e558dd528080c5887371bd9 (patch)
tree03d681b1ed584c82d6e6a388229d7429a3cb42bf
parentdd190fd863fb3089fc7210c3fa66df6ad397f773 (diff)
Issue #2122019 by damiankloip: Remove include_file() logic and getMenuItem() from FormBuilder.
-rw-r--r--core/lib/Drupal/Core/Form/FormBuilder.php24
-rw-r--r--core/tests/Drupal/Tests/Core/Form/FormBuilderTest.php7
2 files changed, 0 insertions, 31 deletions
diff --git a/core/lib/Drupal/Core/Form/FormBuilder.php b/core/lib/Drupal/Core/Form/FormBuilder.php
index cbaf908..0363399 100644
--- a/core/lib/Drupal/Core/Form/FormBuilder.php
+++ b/core/lib/Drupal/Core/Form/FormBuilder.php
@@ -478,21 +478,6 @@ class FormBuilder implements FormBuilderInterface {
// Record the $form_id.
$form_state['build_info']['form_id'] = $form_id;
- // Record the filepath of the include file containing the original form, so
- // the form builder callbacks can be loaded when the form is being rebuilt
- // from cache on a different path (such as 'system/ajax'). See
- // self::getCache(). Don't do this in maintenance mode as Drupal may not be
- // fully bootstrapped (i.e. during installation) in which case
- // menu_get_item() is not available.
- if (!isset($form_state['build_info']['files']['menu']) && !defined('MAINTENANCE_MODE')) {
- $item = $this->menuGetItem();
- if (!empty($item['include_file'])) {
- // Do not use form_load_include() here, as the file is already loaded.
- // Anyway, self::getCache() is able to handle filepaths too.
- $form_state['build_info']['files']['menu'] = $item['include_file'];
- }
- }
-
// We save two copies of the incoming arguments: one for modules to use
// when mapping form ids to constructor functions, and another to pass to
// the constructor function itself.
@@ -1702,15 +1687,6 @@ class FormBuilder implements FormBuilderInterface {
}
/**
- * Wraps menu_get_item().
- *
- * @return array|bool
- */
- protected function menuGetItem() {
- return menu_get_item();
- }
-
- /**
* Wraps watchdog().
*/
protected function watchdog($type, $message, array $variables = NULL, $severity = WATCHDOG_NOTICE, $link = NULL) {
diff --git a/core/tests/Drupal/Tests/Core/Form/FormBuilderTest.php b/core/tests/Drupal/Tests/Core/Form/FormBuilderTest.php
index b0779bd..20c13df 100644
--- a/core/tests/Drupal/Tests/Core/Form/FormBuilderTest.php
+++ b/core/tests/Drupal/Tests/Core/Form/FormBuilderTest.php
@@ -638,13 +638,6 @@ class TestFormBuilder extends FormBuilder {
/**
* {@inheritdoc}
*/
- protected function menuGetItem() {
- return FALSE;
- }
-
- /**
- * {@inheritdoc}
- */
protected function drupalSetMessage($message = NULL, $type = 'status', $repeat = FALSE) {
}