public function AdminExclude::buildForm in Image Lazyloader 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/ AdminExclude.php, line 105
Class
- AdminExclude
- Class AdminExclude.
Namespace
Drupal\lazyloader\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$form = [];
$form['visibility'] = [
'#tree' => TRUE,
];
$form['visibility'] += $this
->buildVisibilityInterface([], $form_state);
$form['filenames'] = [
'#type' => 'textarea',
'#title' => $this
->t('Exclude images by filename'),
'#default_value' => $this->configuration
->get('filenames'),
'#description' => $this
->t('Any filenames entered in this field will be excluded from lazyloading. Enter one filename per line.'),
];
return parent::buildForm($form, $form_state);
}