W3cubDocs

/Drupal 8

protected property FormState::$build_info

An associative array of information stored by Form API that is necessary to build and rebuild the form from cache when the original context may no longer be available:

  • callback: The actual callback to be used to retrieve the form array. Can be any callable. If none is provided $form_id is used as the name of a function to call instead.
  • args: A list of arguments to pass to the form constructor.
  • files: An optional array defining include files that need to be loaded for building the form. Each array entry may be the path to a file or another array containing values for the parameters 'type', 'module' and 'name' as needed by module_load_include(). The files listed here are automatically loaded by \Drupal::formBuilder()->getCache(). By default the current menu router item's 'file' definition is added, if any. Use self::loadInclude() to add include files from a form constructor.
  • form_id: Identification of the primary form being constructed and processed.
  • base_form_id: Identification for a base form, as declared in the form class's \Drupal\Core\Form\BaseFormIdInterface::getBaseFormId() method.
  • immutable: If this flag is set to TRUE, a new form build id is generated when the form is loaded from the cache. If it is subsequently saved to the cache again, it will have another cache id and therefore the original form and form-state will remain unaltered. This is important when page caching is enabled in order to prevent form state from leaking between anonymous users.

Type: array

File

core/lib/Drupal/Core/Form/FormState.php, line 64

Class

FormState
Stores information about the state of a form.

Namespace

Drupal\Core\Form

Code

protected $build_info = array(
  'args' => array(),
  'files' => array(),
);

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Form!FormState.php/property/FormState::build_info/8.1.x