diff --git a/src/Plugin/EntityBrowser/Display/IFrame.php b/src/Plugin/EntityBrowser/Display/IFrame.php index 8db37ee..c8f1061 100644 --- a/src/Plugin/EntityBrowser/Display/IFrame.php +++ b/src/Plugin/EntityBrowser/Display/IFrame.php @@ -127,9 +127,9 @@ public function defaultConfiguration() { * {@inheritdoc} */ public function displayEntityBrowser() { - /** @var \Drupal\entity_browser\Events\RegisterJSCallbacks $event */ - $event = $this->eventDispatcher->dispatch(Events::REGISTER_JS_CALLBACKS, new RegisterJSCallbacks($this->configuration['entity_browser_id'])); $uuid = $this->getUuid(); + /** @var \Drupal\entity_browser\Events\RegisterJSCallbacks $event */ + $event = $this->eventDispatcher->dispatch(Events::REGISTER_JS_CALLBACKS, new RegisterJSCallbacks($this->configuration['entity_browser_id'], $uuid)); $original_path = $this->currentPath->getPath(); return [ '#theme_wrappers' => ['container'], diff --git a/src/Plugin/EntityBrowser/Display/Modal.php b/src/Plugin/EntityBrowser/Display/Modal.php index 92f4545..5283118 100644 --- a/src/Plugin/EntityBrowser/Display/Modal.php +++ b/src/Plugin/EntityBrowser/Display/Modal.php @@ -116,9 +116,9 @@ public function defaultConfiguration() { * {@inheritdoc} */ public function displayEntityBrowser() { - /** @var \Drupal\entity_browser\Events\RegisterJSCallbacks $event */ - $event = $this->eventDispatcher->dispatch(Events::REGISTER_JS_CALLBACKS, new RegisterJSCallbacks($this->configuration['entity_browser_id'])); $uuid = $this->getUuid(); + /** @var \Drupal\entity_browser\Events\RegisterJSCallbacks $event */ + $event = $this->eventDispatcher->dispatch(Events::REGISTER_JS_CALLBACKS, new RegisterJSCallbacks($this->configuration['entity_browser_id'], $uuid)); $original_path = $this->currentPath->getPath(); return [ '#theme_wrappers' => ['container'],