Skip to content
Closed
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
Expand Up @@ -5,5 +5,5 @@ id: embedded_search_form
label: 'Search banner'
icon_uuid: 02327223-76da-4d72-8c6a-59cb98e760b1
icon_default: 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjgiIGhlaWdodD0iNzciIHZpZXdCb3g9IjAgMCA2OCA3NyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjY4IiBoZWlnaHQ9Ijc3IiBmaWxsPSJ3aGl0ZSIvPgo8cmVjdCB4PSI4IiB5PSIyNiIgd2lkdGg9IjUyIiBoZWlnaHQ9IjI1IiBmaWxsPSJ3aGl0ZSIgc3Ryb2tlPSIjQzRDNEM0IiBzdHJva2Utd2lkdGg9IjIiLz4KPHBhdGggZD0iTTE5Ljk3NzkgMzNDMTcuMjQgMzMgMTUgMzUuMjM0OCAxNSAzNy45NzI3QzE1IDQwLjcxMDUgMTcuMjQgNDIuOTUwNSAxOS45Nzc5IDQyLjk1MDVDMjEuMDMwNSA0Mi45NTA1IDIyLjAwNTMgNDIuNjEzNSAyMi44MDkgNDIuMDUzNUwyNS41MDAyIDQ0LjczOTRDMjUuODQyNCA0NS4wODY5IDI2LjQwMjQgNDUuMDg2OSAyNi43NDQ2IDQ0LjczOTRDMjcuMDg2OSA0NC4zOTcyIDI3LjA4NjkgNDMuODQyNCAyNi43NDQ2IDQzLjUwMDJMMjQuMDUzNSA0MC44MDlDMjQuNjE4NyA0MC4wMDAxIDI0Ljk1MDUgMzkuMDI1MyAyNC45NTA1IDM3Ljk3MjdDMjQuOTUwNSAzNS4yMzQ4IDIyLjcxMDUgMzMgMTkuOTc3OSAzM1YzM1pNMTkuOTc3OSAzNC43NTI2QzIxLjc2MTYgMzQuNzUyNiAyMy4xOTI3IDM2LjE4MzggMjMuMTkyNyAzNy45NzI3QzIzLjE5MjcgMzkuNzYxNiAyMS43NjE2IDQxLjE5MjcgMTkuOTc3OSA0MS4xOTI3QzE4LjE4ODkgNDEuMTkyNyAxNi43NTc4IDM5Ljc2MTYgMTYuNzU3OCAzNy45NzI3QzE2Ljc1NzggMzYuMTgzOCAxOC4xODg5IDM0Ljc1MjYgMTkuOTc3OSAzNC43NTI2VjM0Ljc1MjZaIiBmaWxsPSIjQTFBMUExIi8+Cjwvc3ZnPgo='
description: 'Display a full-width search bar under the header of your page.'
description: 'Display a search bar allowing users to perform a search.'
behavior_plugins: { }
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ Feature: Fields for Landing Page content type
And I should see the button "Key dates"
And I should see the button "Image gallery"
And I should see the button "Complex image"
And I should see the button "Search banner"
And I press the "Close" button

And I scroll selector "#edit-group-sidebar" into view
Expand Down
34 changes: 34 additions & 0 deletions modules/tide_landing_page/tide_landing_page.install
Original file line number Diff line number Diff line change
Expand Up @@ -473,3 +473,37 @@ function tide_landing_page_update_10114() {
->save();
}
}

/**
* Update the search banner (embedded_search_form) description.
*/
function tide_landing_page_update_10115() {
$config = \Drupal::configFactory()->getEditable('paragraphs.paragraphs_type.embedded_search_form');

if ($config->isNew()) {
return;
}

$config->set('description', 'Display a search bar allowing users to perform a search.');
$config->save();
}

/**
* Add the search banner (embedded_search_form) to landing page components.
*/
function tide_landing_page_update_10116() {
$field = \Drupal::entityTypeManager()->getStorage('field_config')->load('node.landing_page.field_landing_page_component');

if (!$field) {
return;
}

$settings = $field->getSettings();

if (!isset($settings['handler_settings']['target_bundles']) || array_key_exists('embedded_search_form', $settings['handler_settings']['target_bundles'])) {
return;
}

$settings['handler_settings']['target_bundles']['embedded_search_form'] = 'embedded_search_form';
$field->setSettings($settings)->save();
}
Loading