You are here

public static function ViewsPluginInterface::preRenderFlattenData in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/views/src/Plugin/views/ViewsPluginInterface.php \Drupal\views\Plugin\views\ViewsPluginInterface::preRenderFlattenData()
  2. 9 core/modules/views/src/Plugin/views/ViewsPluginInterface.php \Drupal\views\Plugin\views\ViewsPluginInterface::preRenderFlattenData()

Flattens the structure of form elements.

If a form element has #flatten = TRUE, then all of its children get moved to the same level as the element itself. So $form['to_be_flattened'][$key] becomes $form[$key], and $form['to_be_flattened'] gets unset.

Parameters

array $form: The form build array to alter.

Return value

array The form build array.

File

core/modules/views/src/Plugin/views/ViewsPluginInterface.php, line 131

Class

ViewsPluginInterface
Provides an interface for all views plugins.

Namespace

Drupal\views\Plugin\views

Code

public static function preRenderFlattenData($form);