You are here

public function FormComponentBase::settingsForm in Flexiform 8

Get the settings form.

Parameters

array $form: The form array.

\Drupal\Core\Form\FormStateInterface $form_state: The form state.

Overrides FormComponentInterface::settingsForm

4 methods override FormComponentBase::settingsForm()
CustomTextComponent::settingsForm in src/Plugin/FormComponentType/CustomTextComponent.php
Get the settings form.
ExtraFieldComponent::settingsForm in src/Plugin/FormComponentType/ExtraFieldComponent.php
Get the settings form.
FieldWidgetComponent::settingsForm in src/Plugin/FormComponentType/FieldWidgetComponent.php
Get the settings form.
FormElementComponent::settingsForm in src/Plugin/FormComponentType/FormElementComponent.php
Get the settings form.

File

src/FormComponent/FormComponentBase.php, line 105

Class

FormComponentBase
Provides the base form component plugin.

Namespace

Drupal\flexiform\FormComponent

Code

public function settingsForm(array $form, FormStateInterface $form_state) {
  $settings_form['settings'] = [
    '#type' => 'container',
    'admin_label' => [
      '#type' => 'textfield',
      '#title' => t('Admin Label'),
      '#default_value' => $this->options['admin_label'],
    ],
  ];
  return $settings_form;
}