create OCFL node.json files for each node and associated media/files.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
634 B

<?php
/**
* @file
* Install, update and uninstall functions for the OCFL Export module.
*/
declare(strict_types=1);
/**
* Add settings for file export and Islandora relationship fields.
*/
function ocfl_export_update_10001(): void {
$config = \Drupal::configFactory()->getEditable('ocfl_export.settings');
$defaults = [
'include_files' => TRUE,
'member_of_field' => 'field_member_of',
'media_of_field' => 'field_media_of',
'model_field' => 'field_model',
];
foreach ($defaults as $key => $value) {
if ($config->get($key) === NULL) {
$config->set($key, $value);
}
}
$config->save();
}