vp-1.0.x-dev/modules/vp_analytics/src/Form/VpAnalyticsSettingsForm.php
modules/vp_analytics/src/Form/VpAnalyticsSettingsForm.php
<?php
namespace Drupal\vp_analytics\Form;
use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;
/**
* Configuration form for a vp analytics entity type.
*/
class VpAnalyticsSettingsForm extends FormBase {
/**
* {@inheritdoc}
*/
public function getFormId() {
return 'vp_analytics_settings';
}
/**
* {@inheritdoc}
*/
public function buildForm(array $form, FormStateInterface $form_state) {
$form['settings'] = [
'#markup' => $this->t('Settings form for a vp analytics entity type.'),
];
$form['actions'] = [
'#type' => 'actions',
];
$form['actions']['submit'] = [
'#type' => 'submit',
'#value' => $this->t('Save'),
];
return $form;
}
/**
* {@inheritdoc}
*/
public function submitForm(array &$form, FormStateInterface $form_state) {
$this->messenger()->addStatus($this->t('The configuration has been updated.'));
}
}
