You are here

public function FlexiformBuilderFlexiform::setFlexiformState in Flexiform 7

Set the flexiform state.

Parameters

array $form: The form array being built. Must have a parents key.

array $form_state: The form_State array.

2 calls to FlexiformBuilderFlexiform::setFlexiformState()
FlexiformBuilderFlexiform::form in includes/builder/flexiform.builder.inc
Build the form for this flexiform.
FlexiformBuilderFlexiform::formSubmit in includes/builder/flexiform.builder.inc
Submit the form.

File

includes/builder/flexiform.builder.inc, line 106
Contains the FlexiformBuilderFlexiform Class

Class

FlexiformBuilderFlexiform
Flexiform Builder Class for the complex flexiforms.

Code

public function setFlexiformState($form, &$form_state) {

  // Set up a place to safely store information in the form state.
  if (empty($form_state['flexiform_state'])) {
    $form_state['flexiform_state'] = array();
  }

  // Set the flexiform state.
  drupal_array_set_nested_value($form_state['flexiform_state'], $form['#parents'], $this->flexiformState);
}