function ViewsPluginInterface::preRenderFlattenData
Same name in other branches
- 9 core/modules/views/src/Plugin/views/ViewsPluginInterface.php \Drupal\views\Plugin\views\ViewsPluginInterface::preRenderFlattenData()
- 8.9.x core/modules/views/src/Plugin/views/ViewsPluginInterface.php \Drupal\views\Plugin\views\ViewsPluginInterface::preRenderFlattenData()
- 10 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.
1 method overrides ViewsPluginInterface::preRenderFlattenData()
- PluginBase::preRenderFlattenData in core/
modules/ views/ src/ Plugin/ views/ PluginBase.php - Flattens the structure of form elements.
File
-
core/
modules/ views/ src/ Plugin/ views/ ViewsPluginInterface.php, line 126
Class
- ViewsPluginInterface
- Provides an interface for all views plugins.
Namespace
Drupal\views\Plugin\viewsCode
public static function preRenderFlattenData($form);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.