Skip to content

Commit

Permalink
Database update; allow hs_private_page nodes to be exported via singl…
Browse files Browse the repository at this point in the history
…e_content_sync.
  • Loading branch information
joegl committed Feb 24, 2025
1 parent 699777c commit c652918
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1263,3 +1263,18 @@ function su_humsci_profile_update_9723(&$sandbox) {

$sandbox['#finished'] = count($sandbox['ids']) ? 1 - count($sandbox['ids']) / $sandbox['total'] : 1;
}

/**
* Allow hs_private_page nodes to be exported via single_content_sync.
*/
function su_humsci_profile_update_9724() {
$config_factory = \Drupal::configFactory();
$config = $config_factory->getEditable('single_content_sync.settings');
$allowed_entity_types = $config->get('allowed_entity_types.node');

array_push($allowed_entity_types, 'hs_private_page');
asort($allowed_entity_types);
$allowed_entity_types = array_unique($allowed_entity_types);

$config->set('allowed_entity_types.node', $allowed_entity_types)->save();
}

0 comments on commit c652918

Please sign in to comment.