f0fae68c4f2fa9a3543d83152a3d66feb07b85f6
[yaffs-website] / SettingsTrayFormAnnotationIsClassBlockForm.php
1 <?php
2
3 namespace Drupal\settings_tray_test\Form;
4
5 use Drupal\Core\Form\FormStateInterface;
6 use Drupal\Core\Plugin\PluginFormBase;
7
8 /**
9  * @see \Drupal\settings_tray_test\Plugin\Block\SettingsTrayFormAnnotationIsClassBlock
10  */
11 class SettingsTrayFormAnnotationIsClassBlockForm extends PluginFormBase {
12
13   /**
14    * The block plugin.
15    *
16    * @var \Drupal\Core\Block\BlockPluginInterface
17    */
18   protected $plugin;
19
20   /**
21    * {@inheritdoc}
22    */
23   public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
24     $form = $this->plugin->buildConfigurationForm($form, $form_state);
25
26     $form['some_setting'] = [
27       '#type' => 'select',
28       '#title' => t('Some setting'),
29       '#options' => [
30         'a' => 'A',
31         'b' => 'B',
32       ],
33       '#required' => TRUE,
34     ];
35
36     return $form;
37   }
38
39   /**
40    * {@inheritdoc}
41    */
42   public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {}
43
44 }