CloseBlockClearCookieForm.php in Close Block 8
File
src/Form/CloseBlockClearCookieForm.php
View source
<?php
namespace Drupal\closeblock\Form;
use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;
class CloseBlockClearCookieForm extends FormBase {
public function getFormId() {
return 'closeBlockClearCookieForm';
}
public function buildForm(array $form, FormStateInterface $form_state) {
$form['resetCookie'] = [
'#type' => 'submit',
'#value' => $this
->t('Reset Cookie'),
'#description' => $this
->t('Reset cookie to visible block'),
'#id' => 'closeblock-clear-cookie-button',
];
$form['#attached']['library'][] = 'closeblock/closeblock';
return $form;
}
public function submitForm(array &$form, FormStateInterface $form_state) {
}
}