diff --git a/config/install/islandora.settings.yml b/config/install/islandora.settings.yml index 8fb25fb8..c1f63c88 100644 --- a/config/install/islandora.settings.yml +++ b/config/install/islandora.settings.yml @@ -2,3 +2,4 @@ broker_url: 'tcp://localhost:61613' jwt_expiry: '+2 hour' gemini_url: '' gemini_pseudo_bundles: [] +fedora_url: 'http://localhost:8080/fcrepo/rest' diff --git a/src/EventGenerator/EventGenerator.php b/src/EventGenerator/EventGenerator.php index bf95e97d..0f148374 100644 --- a/src/EventGenerator/EventGenerator.php +++ b/src/EventGenerator/EventGenerator.php @@ -6,6 +6,7 @@ use Drupal\Core\Entity\EntityInterface; use Drupal\islandora\IslandoraUtils; use Drupal\islandora\MediaSource\MediaSourceService; use Drupal\user\UserInterface; +use Drupal\islandora\Form\IslandoraSettingsForm; /** * The default EventGenerator implementation. @@ -87,6 +88,10 @@ class EventGenerator implements EventGeneratorInterface { ], ], ]; + + $fedora_url = \Drupal::config(IslandoraSettingsForm::CONFIG_NAME) + ->get(IslandoraSettingsForm::FEDORA_URL); + $event["target"] = $fedora_url; $entity_type = $entity->getEntityTypeId(); $event_type = $data["event"]; diff --git a/src/Form/IslandoraSettingsForm.php b/src/Form/IslandoraSettingsForm.php index 8079279d..f8c0fe5b 100644 --- a/src/Form/IslandoraSettingsForm.php +++ b/src/Form/IslandoraSettingsForm.php @@ -24,6 +24,7 @@ class IslandoraSettingsForm extends ConfigFormBase { const JWT_EXPIRY = 'jwt_expiry'; const GEMINI_URL = 'gemini_url'; const GEMINI_PSEUDO = 'gemini_pseudo_bundles'; + const FEDORA_URL = 'fedora_url'; /** * To list the available bundle types. @@ -95,6 +96,12 @@ class IslandoraSettingsForm extends ConfigFormBase { '#default_value' => $config->get(self::GEMINI_URL), ]; + $form[self::FEDORA_URL] = [ + '#type' => 'textfield', + '#title' => $this->t('Fedora URL'), + '#default_value' => $config->get(self::FEDORA_URL), + ]; + $selected_bundles = $config->get(self::GEMINI_PSEUDO); $options = [];