You are here

function coder_upgrade_performance_build in Coder 7

Same name and namespace in other branches
  1. 7.2 coder_upgrade/includes/settings.inc \coder_upgrade_performance_build()

Returns form content for performance settings tab.

Return value

array Form item.

1 call to coder_upgrade_performance_build()
coder_upgrade_settings_form in coder_upgrade/includes/settings.inc
Form builder for the settings form.

File

coder_upgrade/includes/settings.inc, line 100
Provides module conversion settings form.

Code

function coder_upgrade_performance_build() {
  $path = coder_upgrade_path('theme_cache');
  $form = array(
    '#type' => 'fieldset',
    '#title' => t('Performance'),
    '#description' => t('To minimize the chance of hitting PHP memory and processing time limits, it is recommended to run Coder Upgrade in a separate process without a Drupal bootstrap. However, because this has been reported to fail on certain combinations of operating system, PHP version, and runtime environment, this option was not set when this module was enabled.'),
    '#tree' => FALSE,
    '#weight' => 1,
  );
  $form['coder_upgrade_use_separate_process'] = array(
    '#type' => 'checkbox',
    '#title' => t('Use separate process'),
    '#default_value' => variable_get('coder_upgrade_use_separate_process', FALSE),
    '#description' => t('If checked, then Coder Upgrade will be run in a separate process without a Drupal bootstrap.'),
  );
  $form['theme_cache'] = array(
    '#type' => 'submit',
    '#value' => t('Cache core theme information'),
    '#prefix' => '<div class="label">' . t('If Drupal core has been updated on this site, then click the button below to refresh the core theme information cache file at @file.', array(
      '@file' => $path,
    )) . '</div>',
  );
  return $form;
}