You are here

public function LabelLengthLimitForm::buildForm in Override label length limititation 8

Same name and namespace in other branches
  1. 2.0.x src/Form/LabelLengthLimitForm.php \Drupal\label_length_limit\Form\LabelLengthLimitForm::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/LabelLengthLimitForm.php, line 32

Class

LabelLengthLimitForm
Class LabelLengthLimitForm.

Namespace

Drupal\label_length_limit\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $config = $this
    ->config('label_length_limit.labellengthlimit');
  $form['label_max_length'] = [
    '#type' => 'number',
    '#title' => $this
      ->t('Enter Default Label Maximum Length'),
    '#description' => $this
      ->t('Enter it between 128-255'),
    '#default_value' => $config
      ->get('label_max_length'),
  ];
  return parent::buildForm($form, $form_state);
}