qr_generator-1.0.1/src/Form/QRCodeSettingsForm.php
src/Form/QRCodeSettingsForm.php
<?php
declare(strict_types=1);
namespace Drupal\qr_generator\Form;
use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;
/**
* Configuration form for a qr code entity type.
*/
final class QRCodeSettingsForm extends FormBase {
/**
* {@inheritdoc}
*/
public function getFormId(): string {
return 'qr_code_settings';
}
/**
* {@inheritdoc}
*/
public function buildForm(array $form, FormStateInterface $form_state): array {
$form['settings'] = [
'#markup' => $this->t('Settings form for a qr code entity type.'),
];
$form['actions'] = [
'#type' => 'actions',
'submit' => [
'#type' => 'submit',
'#value' => $this->t('Save'),
],
];
return $form;
}
/**
* {@inheritdoc}
*/
public function submitForm(array &$form, FormStateInterface $form_state): void {
$this->messenger()->addStatus($this->t('The configuration has been updated.'));
}
}
