You are here

public static function FormBuilderFormBase::fromArray in Form Builder 7

Shortcut for creating a form object from a form array.

2 calls to FormBuilderFormBase::fromArray()
form_builder_set_element in includes/form_builder.api.inc
Set an element within a form structure.
form_builder_unset_element in includes/form_builder.api.inc
Unset an element within a form structure.

File

./form_builder.classes.inc, line 338

Class

FormBuilderFormBase

Code

public static function fromArray($form) {
  $fb = $form['#form_builder'] + array(
    'sid' => NULL,
  );
  return FormBuilderLoader::instance()
    ->getForm($fb['form_type'], $fb['form_id'], $fb['sid'], $form);
}