You are here

function lingotek_admin_configuration_view in Lingotek Translation 7.3

Same name and namespace in other branches
  1. 7.7 lingotek.admin.inc \lingotek_admin_configuration_view()
  2. 7.4 lingotek.admin.inc \lingotek_admin_configuration_view()
  3. 7.5 lingotek.admin.inc \lingotek_admin_configuration_view()
  4. 7.6 lingotek.admin.inc \lingotek_admin_configuration_view()
1 string reference to 'lingotek_admin_configuration_view'
lingotek_menu in ./lingotek.module
Implements hook_menu().

File

./lingotek.admin.inc, line 1223

Code

function lingotek_admin_configuration_view($form_short_id = NULL, $show_fieldset = TRUE) {
  lingotek_is_module_setup();
  $account = LingotekAccount::instance();
  $api = LingotekApi::instance();
  $site = variable_get('site_name', 'Drupal Site');
  $is_enterprise = $account
    ->isEnterprise();

  //$form_short_id values:  config, logging, utilities, language_switcher
  $form_id = "lingotek_admin_{$form_short_id}_form";
  if (!is_null($form_short_id) && function_exists($form_id)) {
    return drupal_get_form($form_id);
  }
  $output = array();
  $output[] = drupal_get_form('lingotek_admin_connection_form', $show_fieldset);
  $output[] = drupal_get_form('lingotek_admin_account_status_form', $show_fieldset);
  $connected = $api
    ->testAuthentication();
  if ($connected) {
    $output[] = drupal_get_form('lingotek_admin_content_defaults_form', $show_fieldset);
    $output[] = drupal_get_form('lingotek_admin_node_translation_settings_form', $show_fieldset);
    $output[] = drupal_get_form('lingotek_admin_additional_translation_settings_form', $show_fieldset);
    if ($is_enterprise) {
      $output[] = drupal_get_form('lingotek_admin_advanced_parsing_form', $show_fieldset);
    }
    $output[] = drupal_get_form('lingotek_admin_prefs_form', $show_fieldset);

    //$output[] = drupal_get_form('lingotek_admin_language_switcher_form', $show_fieldset);
    $output[] = drupal_get_form('lingotek_admin_utilities_form', $show_fieldset);
    $output[] = drupal_get_form('lingotek_admin_logging_form', $show_fieldset);
  }
  return $output;
}