Browse Source

corrected settings name

2.x
ppound 3 years ago
parent
commit
57ba9f413c
  1. 4
      composer.json
  2. 4
      modules/solr_site/src/Form/SolrsiteSettingsForm.php
  3. 2
      modules/solr_site/src/Plugin/Block/RoblibSearchSolrsiteBestbet.php
  4. 2
      modules/solr_site/src/Plugin/Block/RoblibSearchSolrsiteGeneral.php

4
composer.json

@ -21,7 +21,5 @@
"reference": "2.x"
}
],
"require": {
"drupal/core": "^9"
}
"require": { }
}

4
modules/solr_site/src/Form/SolrsiteSettingsForm.php

@ -23,7 +23,7 @@ class SolrsiteSettingsForm extends FormBase {
* {@inheritdoc}
*/
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(
'#type' => 'textfield',
@ -59,7 +59,7 @@ class SolrsiteSettingsForm extends FormBase {
* {@inheritdoc}
*/
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_num_results', $form_state->getValue('solr_site_num_results'))->save();
}

2
modules/solr_site/src/Plugin/Block/RoblibSearchSolrsiteBestbet.php

@ -19,7 +19,7 @@ class RoblibSearchSolrSiteBestbet extends BlockBase {
* {@inheritdoc}
*/
public function build() {
$search_url = \Drupal::config('roblib_search_solr.settings')
$search_url = \Drupal::config('roblib_search_solr_site.settings')
->get('solr_site_url');
$settings = [
'solr_site_search_url' => $search_url,

2
modules/solr_site/src/Plugin/Block/RoblibSearchSolrsiteGeneral.php

@ -19,7 +19,7 @@ class RoblibSearchSolrsiteGeneral extends BlockBase {
* {@inheritdoc}
*/
public function build() {
$search_url = \Drupal::config('roblib_search_solr.settings')
$search_url = \Drupal::config('roblib_search_solr_site.settings')
->get('solr_site_url');
$settings = [
'solr_site_search_url' => $search_url,

Loading…
Cancel
Save