From 09b5191f0dd541ccec095965853f6b71444dd38b Mon Sep 17 00:00:00 2001 From: Adam Vessey Date: Wed, 12 Jul 2023 19:05:06 -0300 Subject: [PATCH] Add post-update hook to install the new entities. --- islandora_hocr.post_update.php | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 islandora_hocr.post_update.php diff --git a/islandora_hocr.post_update.php b/islandora_hocr.post_update.php new file mode 100644 index 0000000..87b2f35 --- /dev/null +++ b/islandora_hocr.post_update.php @@ -0,0 +1,29 @@ +getPath('islandora_hocr') . '/config/install'; + + foreach ($ids as $id) { + $data = Yaml::parseFile("{$config_dir}/{$id}.yml"); + $config = \Drupal::configFactory()->getEditable($id); + if ($config->isNew()) { + $config->initWithData($data)->save(TRUE); + } + } + +}