Skip to content
This repository has been archived by the owner on Sep 30, 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 Feb 22, 2024
2 parents 50f1615 + fb3bdf6 commit bc69f8a
Show file tree
Hide file tree
Showing 25 changed files with 69 additions and 0 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
}
},
"require": {
"dpc-sdp/tide_api": "dev-reference",
"dpc-sdp/tide_core": "dev-reference",
"dpc-sdp/tide_landing_page": "dev-reference",
"drupal/data_pipelines": "1.0.0-alpha22",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ dependencies:
- path
- select2
- text
- tide_content_collection
third_party_settings:
field_group:
group_search_listing_header:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ dependencies:
config:
- field.field.paragraph.listing_custom_filter.field_listing_custom_filter_conf
- paragraphs.paragraphs_type.listing_custom_filter
module:
- tide_content_collection
id: paragraph.listing_custom_filter.default
targetEntityType: paragraph
bundle: listing_custom_filter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ dependencies:
config:
- field.field.paragraph.listing_user_custom_filter.field_user_filter_configuration
- paragraphs.paragraphs_type.listing_user_custom_filter
module:
- tide_content_collection
id: paragraph.listing_user_custom_filter.default
targetEntityType: paragraph
bundle: listing_user_custom_filter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ dependencies:
- paragraphs.paragraphs_type.search_listing_header_component
module:
- select2
- tide_content_collection
id: paragraph.search_listing_header_component.default
targetEntityType: paragraph
bundle: search_listing_header_component
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ dependencies:
- entity_reference_revisions
- metatag
- text
- tide_content_collection
- user
id: node.tide_search_listing.default
targetEntityType: node
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ dependencies:
config:
- field.field.paragraph.listing_custom_filter.field_listing_custom_filter_conf
- paragraphs.paragraphs_type.listing_custom_filter
module:
- tide_content_collection
id: paragraph.listing_custom_filter.default
targetEntityType: paragraph
bundle: listing_custom_filter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ dependencies:
config:
- field.field.paragraph.listing_user_custom_filter.field_user_filter_configuration
- paragraphs.paragraphs_type.listing_user_custom_filter
module:
- tide_content_collection
id: paragraph.listing_user_custom_filter.default
targetEntityType: paragraph
bundle: listing_user_custom_filter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ dependencies:
- field.field.paragraph.search_listing_header_component.field_component
- field.field.paragraph.search_listing_header_component.field_header_configuration
- paragraphs.paragraphs_type.search_listing_header_component
module:
- tide_content_collection
id: paragraph.search_listing_header_component.default
targetEntityType: paragraph
bundle: search_listing_header_component
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ dependencies:
config:
- field.storage.node.field_custom_sort_configuration
- node.type.tide_search_listing
module:
- tide_content_collection
id: node.tide_search_listing.field_custom_sort_configuration
field_name: field_custom_sort_configuration
entity_type: node
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ dependencies:
config:
- field.storage.node.field_listing_query_config
- node.type.tide_search_listing
module:
- tide_content_collection
id: node.tide_search_listing.field_listing_query_config
field_name: field_listing_query_config
entity_type: node
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ dependencies:
config:
- field.storage.node.field_listing_results_config
- node.type.tide_search_listing
module:
- tide_content_collection
id: node.tide_search_listing.field_listing_results_config
field_name: field_listing_results_config
entity_type: node
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ dependencies:
config:
- field.storage.node.field_search_configuration
- node.type.tide_search_listing
module:
- tide_content_collection
id: node.tide_search_listing.field_search_configuration
field_name: field_search_configuration
entity_type: node
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ dependencies:
config:
- field.storage.paragraph.field_listing_custom_filter_conf
- paragraphs.paragraphs_type.listing_custom_filter
module:
- tide_content_collection
id: paragraph.listing_custom_filter.field_listing_custom_filter_conf
field_name: field_listing_custom_filter_conf
entity_type: paragraph
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ dependencies:
config:
- field.storage.paragraph.field_user_filter_configuration
- paragraphs.paragraphs_type.listing_user_custom_filter
module:
- tide_content_collection
id: paragraph.listing_user_custom_filter.field_user_filter_configuration
field_name: field_user_filter_configuration
entity_type: paragraph
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ dependencies:
config:
- field.storage.paragraph.field_header_configuration
- paragraphs.paragraphs_type.search_listing_header_component
module:
- tide_content_collection
id: paragraph.search_listing_header_component.field_header_configuration
field_name: field_header_configuration
entity_type: paragraph
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ dependencies:
module:
- field_permissions
- node
- tide_content_collection
third_party_settings:
field_permissions:
permission_type: public
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ dependencies:
module:
- field_permissions
- node
- tide_content_collection
third_party_settings:
field_permissions:
permission_type: public
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ dependencies:
module:
- field_permissions
- node
- tide_content_collection
third_party_settings:
field_permissions:
permission_type: public
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ status: true
dependencies:
module:
- node
- tide_content_collection
id: node.field_search_configuration
field_name: field_search_configuration
entity_type: node
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ dependencies:
module:
- field_permissions
- paragraphs
- tide_content_collection
third_party_settings:
field_permissions:
permission_type: public
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ dependencies:
module:
- field_permissions
- paragraphs
- tide_content_collection
third_party_settings:
field_permissions:
permission_type: public
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ dependencies:
module:
- field_permissions
- paragraphs
- tide_content_collection
third_party_settings:
field_permissions:
permission_type: public
Expand Down
2 changes: 2 additions & 0 deletions tide_search.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ core_version_requirement: ^9 || ^10
dependencies:
- search_api:search_api
- elasticsearch_connector:elasticsearch_connector
- dpc-sdp:tide_api
- tide_api:tide_content_collection
- dpc-sdp:tide_core
- dpc-sdp:tide_landing_page
- paragraphs
Expand Down
32 changes: 32 additions & 0 deletions tide_search.install
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,35 @@ function tide_search_update_10001() {
$module_installer->install(['tide_data_pipeline']);
}
}

/**
* Add secondary campaign to search listing.
*/
function tide_search_update_10002() {
\Drupal::moduleHandler()->loadInclude('tide_core', 'inc', 'includes/helpers');
$config_location = [\Drupal::service('extension.list.module')->getPath('tide_search') . '/config/optional'];

$config = 'field.field.node.tide_search_listing.field_landing_page_c_secondary';
$type = 'field_config';
$config_read = _tide_read_config($config, $config_location);
$storage = \Drupal::entityTypeManager()->getStorage($type);
$id = substr($config, strrpos($config, '.') + 1);
if ($storage->load($id) == NULL) {
$config_entity = $storage->createFromStorageRecord($config_read);
$config_entity->save();
}

$form_configs = [
'core.entity_view_display.node.tide_search_listing.default',
'core.entity_form_display.node.tide_search_listing.default',
'core.entity_view_display.node.tide_search_listing.teaser',
];
foreach ($form_configs as $form_config) {
$config = \Drupal::configFactory()->getEditable($form_config);
$config_read = _tide_read_config($form_config, $config_location, FALSE);
$config->set('dependencies', $config_read['dependencies']);
$config->set('content', $config_read['content']);
$config->set('hidden', $config_read['hidden']);
$config->save();
}
}

0 comments on commit bc69f8a

Please sign in to comment.