public function ParagraphsSettingsForm::buildForm

File

paragraphs/src/Form/ParagraphsSettingsForm.php, line 30

Class

ParagraphsSettingsForm
Form for Paragraphs settings.

Namespace

Drupal\paragraphs\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $config = $this
    ->config('paragraphs.settings');
  $form['show_unpublished'] = [
    '#type' => 'checkbox',
    '#title' => $this
      ->t('Show unpublished Paragraphs'),
    '#default_value' => $config
      ->get('show_unpublished'),
    '#description' => $this
      ->t('Allow users with "View unpublished paragraphs" permission to see unpublished Paragraphs. Disable this if unpublished paragraphs should be hidden for all users, including super administrators.'),
  ];
  return parent::buildForm($form, $form_state);
}