You are here

function linkit_profiles_form in Linkit 7.3

Linkit profile settings form.

Parameters

$form: A nested array of form elements that comprise the form.

$form_state: An associative array containing the current state of the form.

File

plugins/export_ui/linkit_profiles.inc, line 34

Code

function linkit_profiles_form(&$form, &$form_state) {
  $profile = $form_state['item'];

  // Add the weight field.
  $form['weight'] = array(
    '#type' => 'weight',
    '#title' => t('Profile weight'),
    '#description' => t('Used when sorting profiles in a list. Heavier profiles go to the bottom of the list, lighter profiles rise to the top. The first profile in a list will be the default.'),
    '#default_value' => isset($profile->weight) ? $profile->weight : 0,
  );

  // Set data as a tree.
  $form['data'] = array(
    '#tree' => TRUE,
    '#type' => 'vertical_tabs',
  );

  // Append profile type settings to the profile form.
  _linkit_build_profile_type_form_fields($form, $profile);

  // Append search plugin form element to the profile form.
  _linkit_build_search_plugin_form_fields($form, $profile);

  // Append insert plugin form element to the profile form.
  _linkit_build_insert_plugin_form_fields($form, $profile);

  // Append attribute plugin form element to the profile form.
  _linkit_build_attribute_plugin_form_fields($form, $profile);

  // Append IMCE plugin form element to the profile form.
  if (module_exists('imce')) {
    _linkit_build_imce_form_fields($form, $profile);
  }

  // Append autocomplete (BAC) form element to the profile form.
  _linkit_build_autocomplete_form_fields($form, $profile);
}