public function WorkbenchAccessConfigForm::buildForm in Workbench Access 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/ WorkbenchAccessConfigForm.php, line 30
Class
- WorkbenchAccessConfigForm
- Configure Workbench access settings for this site.
Namespace
Drupal\workbench_access\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$config = $this
->config('workbench_access.settings');
$form['deny_on_empty'] = [
'#type' => 'checkbox',
'#title' => $this
->t('Deny access to unassigned content'),
'#default_value' => $config
->get('deny_on_empty'),
'#description' => $this
->t('For content under access control, deny access for any content not assigned to a section. This setting is off by default so that installing the module does not break existing site behavior.'),
];
return parent::buildForm($form, $form_state);
}