diff --git a/modules/helfi_react_search/config/schema/helfi_react_search.schema.yml b/modules/helfi_react_search/config/schema/helfi_react_search.schema.yml index 8f5f19cee..3d7bd3a06 100644 --- a/modules/helfi_react_search/config/schema/helfi_react_search.schema.yml +++ b/modules/helfi_react_search/config/schema/helfi_react_search.schema.yml @@ -1,3 +1,19 @@ +react_search.settings: + type: config_object + label: 'React search settings' + mapping: + sentry_dsn_react: + type: string + label: 'Sentry DSN for React' + +elastic_proxy.settings: + type: config_object + label: 'Elastic proxy settings' + mapping: + elastic_proxy_url: + type: string + label: 'Elastic proxy URL' + field.widget.settings.linked_events_select2: type: field.widget.settings.select2 label: 'Linked events Select2 widget' diff --git a/modules/helfi_recommendations/helfi_recommendations.install b/modules/helfi_recommendations/helfi_recommendations.install index 3465a1124..352e71d0b 100644 --- a/modules/helfi_recommendations/helfi_recommendations.install +++ b/modules/helfi_recommendations/helfi_recommendations.install @@ -7,6 +7,7 @@ declare(strict_types=1); +use Drupal\block\Entity\Block; use Drupal\Core\Entity\Display\EntityViewDisplayInterface; use Drupal\Core\Entity\Entity\EntityViewMode; use Drupal\Core\Extension\ModuleHandlerInterface; @@ -155,7 +156,7 @@ function helfi_recommendations_set_text_converter_view_display(string $entity_ty * The block configurations. */ function helfi_recommendations_get_block_configurations(string $theme) : array { - $blocks = [ + return [ 'block' => [ 'id' => 'helfirecommendationsblock', 'plugin' => 'helfi_recommendations', @@ -166,7 +167,7 @@ function helfi_recommendations_get_block_configurations(string $theme) : array { 'label_display' => FALSE, 'provider' => 'helfi_recommendations', ], - 'weight' => 1, + 'weight' => 10, 'visibility' => [ 'language' => [ 'id' => 'language', @@ -198,8 +199,6 @@ function helfi_recommendations_get_block_configurations(string $theme) : array { ], ], ]; - - return $blocks; } /** @@ -347,3 +346,12 @@ function helfi_recommendations_update_10005(&$sandbox) : void { } } + +/** + * UHF-12723: Allow adding blocks before recommendations block. + */ +function helfi_recommendations_update_11001() : void { + Block::load('helfirecommendationsblock') + ->setWeight(10) + ->save(); +}