You are here

function varbase_development_build_formbit in Varbase: The Ultimate Drupal CMS Starter Kit (Bootstrap Ready) 8.5

Same name and namespace in other branches
  1. 8.8 src/FormBit/varbase_development.formbit.php \varbase_development_build_formbit()
  2. 8.4 src/FormBit/varbase_development.formbit.php \varbase_development_build_formbit()
  3. 8.6 src/FormBit/varbase_development.formbit.php \varbase_development_build_formbit()
  4. 8.7 src/FormBit/varbase_development.formbit.php \varbase_development_build_formbit()
  5. 9.0.x src/FormBit/varbase_development.formbit.php \varbase_development_build_formbit()

Build form bit.

Parameters

array $formbit: FormBit for the form.

FormStateInterface $form_state: Form status.

array $install_state: Install state.

File

src/FormBit/varbase_development.formbit.php, line 36
FormBit file for varbase_development feature mdoule.

Code

function varbase_development_build_formbit(array &$formbit, FormStateInterface &$form_state, array &$install_state = NULL) {
  $formbit['error_level'] = [
    '#type' => 'radios',
    '#title' => t('Error messages to display'),
    '#default_value' => ERROR_REPORTING_HIDE,
    '#options' => [
      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.'),
  ];
}