From c563c18e7722d87dc4f2835624f78205a1626423 Mon Sep 17 00:00:00 2001 From: rpnykanen Date: Wed, 18 Oct 2023 07:28:14 +0300 Subject: [PATCH] UHF-9080: check the view id, added docblock --- .../custom/helfi_rekry_content/helfi_rekry_content.module | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/public/modules/custom/helfi_rekry_content/helfi_rekry_content.module b/public/modules/custom/helfi_rekry_content/helfi_rekry_content.module index d00be48d..dcfd1d32 100644 --- a/public/modules/custom/helfi_rekry_content/helfi_rekry_content.module +++ b/public/modules/custom/helfi_rekry_content/helfi_rekry_content.module @@ -439,7 +439,14 @@ function helfi_rekry_content_preprocess_block(&$variables) { } } +/** + * Implements hook_views_query_alter(). + */ function helfi_rekry_content_views_query_alter(ViewExecutable $view, QueryPluginBase $query) { + if ($view->id() !== 'job_listing_search') { + return; + } + $task_area_external_id = $query ->where[0]["conditions"][0]["value"][":node__field_task_area_field_task_area_target_id"];