Allow page view derived Advanced Search blocks on any page (#843)

* Allow page view derived Advanced Search blocks on any page

Allows the Advanced Search block to be used on pages
where its corresponding view is not present. Now it
will redirect to the route associated with the view
it was generated from.

This is not valid for Advanced Search blocks that
are derived from non-page based views, as there is
no known location in which to redirect the query.

* Fix for undefined index warning.

* Documented Exposed form style settings requirement for Advanced Search.
This commit is contained in:
Nigel Banks 2021-07-29 14:59:28 +01:00 committed by GitHub
parent 1f611a3876
commit 5c6c26f43f
6 changed files with 96 additions and 16 deletions

View file

@ -371,7 +371,7 @@ class AdvancedSearchBlock extends BlockBase implements ContainerFactoryPluginInt
foreach ($this->configuration[self::SETTING_FIELDS] as $identifier) {
$configured_fields[$identifier] = $fields[$identifier];
}
return $this->formBuilder->getForm('Drupal\islandora_advanced_search\Form\AdvancedSearchForm', $configured_fields, $this->configuration[self::SETTING_CONTEXTUAL_FILTER]);
return $this->formBuilder->getForm('Drupal\islandora_advanced_search\Form\AdvancedSearchForm', $this->view, $this->display, $configured_fields, $this->configuration[self::SETTING_CONTEXTUAL_FILTER]);
}
/**