public function LoggingForm::buildForm

Implements \Drupal\Core\Form\FormInterface::buildForm().

Overrides SystemConfigFormBase::buildForm

File

drupal/core/modules/system/lib/Drupal/system/Form/LoggingForm.php, line 27
Contains \Drupal\system\Form\LoggingForm.

Class

LoggingForm
Configure logging settings for this site.

Namespace

Drupal\system\Form

Code

public function buildForm(array $form, array &$form_state) {
  $config = $this->configFactory
    ->get('system.logging');
  $form['error_level'] = array(
    '#type' => 'radios',
    '#title' => t('Error messages to display'),
    '#default_value' => $config
      ->get('error_level'),
    '#options' => array(
      ERROR_REPORTING_HIDE => t('None'),
      ERROR_REPORTING_DISPLAY_SOME => t('Errors and warnings'),
      ERROR_REPORTING_DISPLAY_ALL => t('All messages'),
      ERROR_REPORTING_DISPLAY_VERBOSE => t('All messages, with backtrace information'),
    ),
    '#description' => t('It is recommended that sites running on production environments do not display any errors.'),
  );
  return parent::buildForm($form, $form_state);
}