public function LingotekSettingsTabLoggingForm::buildForm in Lingotek Translation 8
Same name and namespace in other branches
- 8.2 src/Form/LingotekSettingsTabLoggingForm.php \Drupal\lingotek\Form\LingotekSettingsTabLoggingForm::buildForm()
- 4.0.x src/Form/LingotekSettingsTabLoggingForm.php \Drupal\lingotek\Form\LingotekSettingsTabLoggingForm::buildForm()
- 3.0.x src/Form/LingotekSettingsTabLoggingForm.php \Drupal\lingotek\Form\LingotekSettingsTabLoggingForm::buildForm()
- 3.1.x src/Form/LingotekSettingsTabLoggingForm.php \Drupal\lingotek\Form\LingotekSettingsTabLoggingForm::buildForm()
- 3.2.x src/Form/LingotekSettingsTabLoggingForm.php \Drupal\lingotek\Form\LingotekSettingsTabLoggingForm::buildForm()
- 3.3.x src/Form/LingotekSettingsTabLoggingForm.php \Drupal\lingotek\Form\LingotekSettingsTabLoggingForm::buildForm()
- 3.4.x src/Form/LingotekSettingsTabLoggingForm.php \Drupal\lingotek\Form\LingotekSettingsTabLoggingForm::buildForm()
- 3.5.x src/Form/LingotekSettingsTabLoggingForm.php \Drupal\lingotek\Form\LingotekSettingsTabLoggingForm::buildForm()
- 3.6.x src/Form/LingotekSettingsTabLoggingForm.php \Drupal\lingotek\Form\LingotekSettingsTabLoggingForm::buildForm()
- 3.7.x src/Form/LingotekSettingsTabLoggingForm.php \Drupal\lingotek\Form\LingotekSettingsTabLoggingForm::buildForm()
- 3.8.x src/Form/LingotekSettingsTabLoggingForm.php \Drupal\lingotek\Form\LingotekSettingsTabLoggingForm::buildForm()
Form constructor.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Return value
array The form structure.
Overrides ConfigFormBase::buildForm
File
- src/
Form/ LingotekSettingsTabLoggingForm.php, line 28 - Contains \Drupal\lingotek\Form\LingotekSettingsLoggingForm.
Class
- LingotekSettingsTabLoggingForm
- Configure Lingotek
Namespace
Drupal\lingotek\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$form['log'] = array(
'#type' => 'details',
'#title' => t('Logging'),
'#description' => t('Help troubleshoot any issues with the module. The logging enabled below will be available in the') . ' ' . \Drupal::l(t('Drupal watchdog.'), Url::fromUri('internal:/admin/reports/dblog')),
);
$form['log']['error_logging'] = array(
'#type' => 'checkbox',
'#title' => t('Error Logging'),
'#description' => t('This prints errors and warnings to the web server\'s error logs in addition to adding them to watchdog.'),
'#default_value' => $this->lingotek
->get('logging.lingotek_error_log'),
);
$form['log']['warning_logging'] = array(
'#type' => 'checkbox',
'#title' => t('Warning Logging'),
'#description' => t('This logs any warnings in watchdog and the web server\'s error logs.'),
'#default_value' => $this->lingotek
->get('logging.lingotek_warning_log'),
);
$form['log']['interaction_logging'] = array(
'#type' => 'checkbox',
'#title' => t('API & Interaction Logging'),
'#description' => t('Logs the timing and request/response details of all Lingotek API calls. Additionally, interaction calls (e.g., endpoint, notifications) made back to Drupal will be logged with this enabled.'),
'#default_value' => $this->lingotek
->get('logging.lingotek_api_debug'),
);
$form['log']['trace_logging'] = array(
'#type' => 'checkbox',
'#title' => t('Trace Logging'),
'#description' => t('This logs trace debug messages to watchdog and the web server\'s error logs. (This logging is extremely verbose.)'),
'#default_value' => $this->lingotek
->get('logging.lingotek_trace_log'),
);
$form['log']['never_cache'] = array(
'#type' => 'checkbox',
'#title' => t('Never Cache'),
'#description' => t('Skips caching so you can test easier. This avoids frequent polling of fresh data from Lingotek. Only those with Developer permissions will have caching disabled.'),
'#default_value' => $this->lingotek
->get('logging.lingotek_flush_cache'),
);
$form['log']['actions']['#type'] = 'actions';
$form['log']['actions']['submit'] = array(
'#type' => 'submit',
'#value' => $this
->t('Save'),
'#button_type' => 'primary',
);
return $form;
}