public function SettingsForm::buildForm in Webhooks 8
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/ SettingsForm.php, line 30
Class
- SettingsForm
- Configure Webhooks settings for this site.
Namespace
Drupal\webhooks\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$form['reliable'] = [
'#type' => 'checkbox',
'#title' => $this
->t('Use a reliable queue for non-blocking webhooks'),
'#description' => $this
->t('Reliable queues preserve the order of messages and <strong>guarantee</strong> that every item will be executed at least once, other queues will do a <strong>best effort</strong> to preserve order in messages and to execute them at least once.'),
'#default_value' => $this
->config('webhooks.settings')
->get('reliable'),
];
return parent::buildForm($form, $form_state);
}