Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
16 changes: 12 additions & 4 deletions modules/helfi_recommendations/helfi_recommendations.install
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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',
Expand All @@ -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',
Expand Down Expand Up @@ -198,8 +199,6 @@ function helfi_recommendations_get_block_configurations(string $theme) : array {
],
],
];

return $blocks;
}

/**
Expand Down Expand Up @@ -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();
}