You are here

public function DummyFieldProperty::buildConfigurationForm in Search API Solr 4.x

Same name and namespace in other branches
  1. 8.3 src/Plugin/search_api/processor/Property/DummyFieldProperty.php \Drupal\search_api_solr\Plugin\search_api\processor\Property\DummyFieldProperty::buildConfigurationForm()
  2. 8.2 src/Plugin/search_api/processor/Property/DummyFieldProperty.php \Drupal\search_api_solr\Plugin\search_api\processor\Property\DummyFieldProperty::buildConfigurationForm()

File

src/Plugin/search_api/processor/Property/DummyFieldProperty.php, line 31

Class

DummyFieldProperty
Defines a "dummy field" property.

Namespace

Drupal\search_api_solr\Plugin\search_api\processor\Property

Code

public function buildConfigurationForm(FieldInterface $field, array $form, FormStateInterface $form_state) {
  $configuration = $field
    ->getConfiguration();
  $form['dummy_value'] = [
    '#type' => 'textfield',
    '#title' => $this
      ->t('Dummy value'),
    '#description' => $this
      ->t('The value to be set initially on the dummy field.'),
    '#default_value' => $configuration['dummy_value'],
    '#required' => TRUE,
  ];
  return $form;
}