|
|
@ -23,7 +23,7 @@ class SolrsiteSettingsForm extends FormBase { |
|
|
|
* {@inheritdoc} |
|
|
|
* {@inheritdoc} |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public function buildForm(array $form, FormStateInterface $form_state) { |
|
|
|
public function buildForm(array $form, FormStateInterface $form_state) { |
|
|
|
$config = \Drupal::config('roblib_search_solr.settings'); |
|
|
|
$config = \Drupal::config('roblib_search_solr_site.settings'); |
|
|
|
|
|
|
|
|
|
|
|
$form['solr_site_url'] = array( |
|
|
|
$form['solr_site_url'] = array( |
|
|
|
'#type' => 'textfield', |
|
|
|
'#type' => 'textfield', |
|
|
@ -59,7 +59,7 @@ class SolrsiteSettingsForm extends FormBase { |
|
|
|
* {@inheritdoc} |
|
|
|
* {@inheritdoc} |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public function submitForm(array &$form, FormStateInterface $form_state) { |
|
|
|
public function submitForm(array &$form, FormStateInterface $form_state) { |
|
|
|
$config = \Drupal::configFactory()->getEditable('roblib_search_solr.settings'); |
|
|
|
$config = \Drupal::configFactory()->getEditable('roblib_search_solr_site.settings'); |
|
|
|
$config->set('solr_site_url', $form_state->getValue('solr_site_url'))->save(); |
|
|
|
$config->set('solr_site_url', $form_state->getValue('solr_site_url'))->save(); |
|
|
|
$config->set('solr_site_num_results', $form_state->getValue('solr_site_num_results'))->save(); |
|
|
|
$config->set('solr_site_num_results', $form_state->getValue('solr_site_num_results'))->save(); |
|
|
|
} |
|
|
|
} |
|
|
|