You are here

public static function SubformState::getNewSubForm in Typed Data API enhancements 8

Gets a new sub-form array.

Sub-forms must have #tree set to TRUE, so this is set as default.

Return value

mixed[] The new sub-form.

7 calls to SubformState::getNewSubForm()
BrokenWidget::form in src/Plugin/TypedDataFormWidget/BrokenWidget.php
Creates the widget's form elements for editing the given data.
DatetimeRangeWidget::form in src/Plugin/TypedDataFormWidget/DatetimeRangeWidget.php
Creates the widget's form elements for editing the given data.
DatetimeWidget::form in src/Plugin/TypedDataFormWidget/DatetimeWidget.php
Creates the widget's form elements for editing the given data.
SelectWidget::form in src/Plugin/TypedDataFormWidget/SelectWidget.php
Creates the widget's form elements for editing the given data.
SubformState::createWithParents in src/Form/SubformState.php
Creates a new subform by specifying the array parents.

... See full list

File

src/Form/SubformState.php, line 54

Class

SubformState
Class SubformState.

Namespace

Drupal\typed_data\Form

Code

public static function getNewSubForm() {
  return [
    '#tree' => TRUE,
  ];
}