Issue #2122019 by damiankloip: Remove include_file() logic and getMenuItem() from FormBuilder.

8.0.x
Dries 2013-11-17 20:27:35 -05:00
parent dd190fd863
commit 9c306c1cb6
2 changed files with 0 additions and 31 deletions

View File

@ -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.
@ -1701,15 +1686,6 @@ class FormBuilder implements FormBuilderInterface {
return drupal_installation_attempted();
}
/**
* Wraps menu_get_item().
*
* @return array|bool
*/
protected function menuGetItem() {
return menu_get_item();
}
/**
* Wraps watchdog().
*/

View File

@ -635,13 +635,6 @@ class TestFormBuilder extends FormBuilder {
return FALSE;
}
/**
* {@inheritdoc}
*/
protected function menuGetItem() {
return FALSE;
}
/**
* {@inheritdoc}
*/