public function Solr::buildConfigurationForm in Search API Synonym 8
Plugin configuration form.
Parameters
array $form: Form array.
\Drupal\Core\Form\FormStateInterface $form_state: The form state array.
Return value
array Form array.
Overrides ImportPluginBase::buildConfigurationForm
File
- src/
Plugin/ search_api_synonym/ import/ Solr.php, line 68
Class
- Solr
- Import of Solr synonyms.txt files.
Namespace
Drupal\search_api_synonym\Plugin\search_api_synonym\importCode
public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
$example_url = 'internal:' . base_path() . drupal_get_path('module', 'search_api_synonym') . '/examples/solr_synonyms.txt';
$form['template'] = [
'#type' => 'item',
'#title' => $this
->t('Example'),
'#markup' => Link::fromTextAndUrl(t('Download example file'), Url::fromUri($example_url))
->toString(),
];
return $form;
}