Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ViewsPluginInterface.php

function 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 138

Class

ViewsPluginInterface
Provides an interface for all views plugins.

Namespace

Drupal\views\Plugin\views

Code

public static function preRenderFlattenData($form);

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal