Skip to content
This repository has been archived by the owner on Sep 29, 2024. It is now read-only.

Commit

Permalink
Merge changes from develop.
Browse files Browse the repository at this point in the history
  • Loading branch information
sdpdeploy committed May 2, 2024
2 parents af50a4c + 8c7f8c6 commit ab1ccc0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ settings:
-
value: none
label: 'Full site search'
-
value: event
label: Events
-
value: news
label: News
-
value: custom
label: Custom
Expand Down
18 changes: 1 addition & 17 deletions tide_landing_page.install
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* Tide Landing Page install.
*/

use Drupal\field\Entity\FieldStorageConfig;
use Drupal\tide_landing_page\TideLandingPageOperation;

/**
Expand Down Expand Up @@ -49,25 +48,10 @@ function tide_landing_page_update_10100() {
$config->save();
}

/**
* Remove event and news from search block.
*/
function tide_landing_page_update_10101() {
$field_storage = FieldStorageConfig::loadByName('paragraph', 'field_paragraph_search_block');
if (!$field_storage) {
return;
}
$current_allowed_values = $field_storage->getSetting('allowed_values');
unset($current_allowed_values['event']);
unset($current_allowed_values['news']);
$field_storage->setSetting('allowed_values', $current_allowed_values);
$field_storage->save();
}

/**
* Imports landing_page.field_content_category for existing sites.
*/
function tide_landing_page_update_10102() {
function tide_landing_page_update_10101() {
\Drupal::moduleHandler()->loadInclude('tide_core', 'inc', 'includes/helpers');
$config_location = [\Drupal::service('extension.list.module')->getPath('tide_landing_page') . '/config/install'];
$config_read = _tide_read_config('field.field.node.landing_page.field_content_category', $config_location, TRUE);
Expand Down

0 comments on commit ab1ccc0

Please sign in to comment.