From f0162278d6350c5efcd3e7ff6dad8191890a4f3e Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Thu, 21 Feb 2019 11:36:30 +0100 Subject: [PATCH] BpConfig: Process node imports in hasNode() and getNode() --- library/Businessprocess/BpConfig.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/library/Businessprocess/BpConfig.php b/library/Businessprocess/BpConfig.php index cfa5268..aafabd7 100644 --- a/library/Businessprocess/BpConfig.php +++ b/library/Businessprocess/BpConfig.php @@ -454,6 +454,9 @@ class BpConfig { if (array_key_exists($name, $this->nodes)) { return true; + } elseif ($name[0] === '@') { + list($configName, $nodeName) = preg_split('~:\s*~', substr($name, 1), 2); + return $this->getImportedConfig($configName)->hasNode($nodeName); } return false; @@ -645,6 +648,11 @@ class BpConfig return $this->nodes[$name]; } + if ($name[0] === '@') { + list($configName, $nodeName) = preg_split('~:\s*~', substr($name, 1), 2); + return $this->getImportedConfig($configName)->getNode($nodeName); + } + // Fallback: if it is a service, create an empty one: $this->warn(sprintf('The node "%s" doesn\'t exist', $name)); $pos = strpos($name, ';');