
| Current Path : /var/www/html/vendor/chi-teck/drupal-code-generator/templates/form/confirm/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/vendor/chi-teck/drupal-code-generator/templates/form/confirm/form.twig |
<?php
namespace Drupal\{{ machine_name }}\Form;
use Drupal\Core\Form\ConfirmFormBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Url;
/**
* Provides a confirmation form before clearing out the examples.
*/
class {{ class }} extends ConfirmFormBase {
/**
* {@inheritdoc}
*/
public function getFormId() {
return '{{ form_id }}';
}
/**
* {@inheritdoc}
*/
public function getQuestion() {
return $this->t('Are you sure you want to do this?');
}
/**
* {@inheritdoc}
*/
public function getCancelUrl() {
return new Url('system.admin_config');
}
/**
* {@inheritdoc}
*/
public function submitForm(array &$form, FormStateInterface $form_state) {
// @DCG Place your code here.
$this->messenger()->addStatus($this->t('Done!'));
$form_state->setRedirectUrl(new Url('system.admin_config'));
}
}