You are here

function joomla_import_form_checkboxes in Joomla to Drupal 7

Same name and namespace in other branches
  1. 6 joomla.module \joomla_import_form_checkboxes()
  2. 7.2 joomla.module \joomla_import_form_checkboxes()

These checkboxes are used on both the admin and import forms

2 calls to joomla_import_form_checkboxes()
joomla_admin_settings in ./joomla.module
joomla_import_form in ./joomla.module

File

./joomla.module, line 107
The joomla module used for migrate Joomla to Drupal.

Code

function joomla_import_form_checkboxes(&$form_state = NULL) {
  $form['joomla_import'] = array(
    '#type' => 'fieldset',
    '#title' => t('Items to import'),
    '#collapsible' => FALSE,
    '#collapsed' => FALSE,
  );
  $form['joomla_import']['joomla_import_content'] = array(
    '#type' => 'checkbox',
    '#title' => t('Import content'),
    '#default_value' => variable_get('joomla_import_content', JOOMLA_IMPORT_CONTENT),
  );
  $form['joomla_import']['joomla_import_categories'] = array(
    '#type' => 'checkbox',
    '#title' => t('Import categories'),
    '#default_value' => variable_get('joomla_import_categories', JOOMLA_IMPORT_CATEGORIES),
  );
  $form['joomla_import']['joomla_import_users'] = array(
    '#type' => 'checkbox',
    '#title' => t('Import users'),
    '#default_value' => variable_get('joomla_import_users', JOOMLA_IMPORT_USERS),
  );
  $form['joomla_update_duplicate'] = array(
    '#type' => 'checkbox',
    '#title' => t('Update previously imported items?'),
    '#description' => t('If selected, any items which have already been imported, and which have been updated on the Joomla website, will be updated.'),
    '#default_value' => variable_get('joomla_update_duplicate', JOOMLA_UPDATE_DUPLICATE),
  );
  return $form;
}