You are here

function development_environment_settings_form in Development Environment 7

Form definition for the Development Environment Settings Form.

1 string reference to 'development_environment_settings_form'
development_environment_admin_page in includes/development_environment.pages.inc
Page definition for the Development Environment admin page.

File

includes/development_environment.forms.inc, line 11
Form definitions for forms defined in the Development Environment module.

Code

function development_environment_settings_form(array $form, array $form_state) {
  $form['log_emails'] = [
    '#title' => t('Suppress emails'),
    '#type' => 'checkbox',
    '#default_value' => variable_get('development_environment.log_emails', FALSE),
    '#description' => t('If this box is checked, emails will not be sent from the system, and will instead be written to the log.'),
  ];
  $form['log_emails_display'] = [
    '#prefix' => '<p>',
    '#suffix' => '</p>',
  ];
  $form['log_emails_gui_description'] = [
    '#prefix' => '<p>',
    '#suffix' => '</p>',
    '#markup' => t("To prevent this setting from being managed through the admin UI, add a line containing <code>&#36;conf['development_environment.log_emails'] = TRUE;</code> (or FALSE) to settings.php."),
  ];
  $form['submit'] = [
    '#type' => 'submit',
    '#value' => t('Submit'),
  ];
  return $form;
}