You are here

function feeds_form in Feeds 7.2

Same name and namespace in other branches
  1. 8.2 feeds.module \feeds_form()
  2. 6 includes/FeedsConfigurable.inc \feeds_form()
  3. 7 includes/FeedsConfigurable.inc \feeds_form()

Form constructor for a Feeds configuration form.

Don't call directly, but use feeds_get_form($configurable, 'method') instead.

Parameters

array $form: The form.

array $form_state: The current state of the form.

FeedsConfigurable $configurable: The object to perform the save() operation on.

string $form_method: The $form_method that should be rendered.

Return value

array Form array.

1 string reference to 'feeds_form'
feeds_forms in ./feeds.module
Implements hook_forms().

File

includes/FeedsConfigurable.inc, line 360
FeedsConfigurable and helper functions.

Code

function feeds_form(array $form, array &$form_state, FeedsConfigurable $configurable, $form_method) {
  $form = $configurable
    ->{$form_method}($form_state);
  $form['#configurable'] = $configurable;
  $form['#feeds_form_method'] = $form_method;
  $form['#validate'] = array(
    'feeds_form_validate',
  );
  $form['#submit'] = array(
    'feeds_form_submit',
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Save'),
    '#weight' => 100,
  );
  return $form;
}