You are here

public function ConnectionSettingsForm::buildForm in RedHen CRM 8

Defines the settings form for Connection entities.

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 Form definition array.

Overrides ConfigFormBase::buildForm

File

modules/redhen_connection/src/Form/ConnectionSettingsForm.php, line 62

Class

ConnectionSettingsForm
Class ConnectionSettingsForm.

Namespace

Drupal\redhen_connection\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $config = $this
    ->config('redhen_connection.settings');
  $form = [
    'auto_disable_connections' => [
      '#type' => 'checkbox',
      '#title' => t('Automatically mark connections inactive when either of their endpoints are marked inactive'),
      '#description' => t('When a RedHen Organization or Contact is marked inactive, all of its connections will be marked inactive.'),
      '#default_value' => $config
        ->get('auto_disable_connections'),
    ],
  ];
  return parent::buildForm($form, $form_state);
}