You are here

public function CanonicalUrlProperty::buildConfigurationForm in Search API Field Map 4.x

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

File

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

Class

CanonicalUrlProperty
Defines a "Canonical URL" property.

Namespace

Drupal\search_api_field_map\Plugin\search_api\processor\Property

Code

public function buildConfigurationForm(FieldInterface $field, array $form, FormStateInterface $form_state) {
  $form['#attached']['library'][] = 'search_api/drupal.search_api.admin_css';
  $form['#tree'] = TRUE;
  $form['field_data'] = [
    '#type' => 'item',
    '#title' => $this
      ->t('Canonical URL'),
    '#description' => $this
      ->t('Preferred URL for this content.'),
  ];
  return $form;
}