From fb6e7b33c11c8c82d72909e4d0e66be5f03fdd41 Mon Sep 17 00:00:00 2001 From: Matthew Wu Date: Mon, 1 Apr 2024 14:51:07 -0400 Subject: [PATCH] create "none" option --- src/Plugin/Block/AdvancedSearchBlock.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Plugin/Block/AdvancedSearchBlock.php b/src/Plugin/Block/AdvancedSearchBlock.php index ce41963..bdc4204 100644 --- a/src/Plugin/Block/AdvancedSearchBlock.php +++ b/src/Plugin/Block/AdvancedSearchBlock.php @@ -334,6 +334,7 @@ public function blockForm($form, FormStateInterface $form_state) { $form[self::SETTING_CONTEXTUAL_FILTER] = [ '#type' => 'select', '#title' => $this->t('Context Filter'), + '#empty_option' => $this->t('- None -'), // Set the empty option '#description' => $this->t('If more than one Context Filter is defined, specify which is used to include only direct children of the Collection as it will disabled to allow recursive searching.'), '#options' => $options, '#default_value' => $this->configuration[self::SETTING_CONTEXTUAL_FILTER],