layout_paragraphs-1.0.x-dev/tests/modules/layout_paragraphs_custom_host_entity_test/src/Form/LpHostEntitySettingsForm.php
tests/modules/layout_paragraphs_custom_host_entity_test/src/Form/LpHostEntitySettingsForm.php
<?php
namespace Drupal\layout_paragraphs_custom_host_entity_test\Form;
use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;
/**
* Configuration form for a lp host entity entity type.
*/
class LpHostEntitySettingsForm extends FormBase {
/**
* {@inheritdoc}
*/
public function getFormId() {
return 'lp_host_entity_settings';
}
/**
* {@inheritdoc}
*/
public function buildForm(array $form, FormStateInterface $form_state) {
$form['settings'] = [
'#markup' => $this->t('Settings form for a lp host entity 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.'));
}
}
