From 3b24677931abe0b8d45e8d0a68277edb8aeae3c8 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Sun, 8 Apr 2018 11:50:55 +0200 Subject: [PATCH] Update object type definition PIP to save GUI-added/edited entries in DB See #2545 --- ...finitionPackageInstallationPlugin.class.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/wcfsetup/install/files/lib/system/package/plugin/ObjectTypeDefinitionPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/ObjectTypeDefinitionPackageInstallationPlugin.class.php index f69894690d..ad7dc66aba 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/ObjectTypeDefinitionPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/ObjectTypeDefinitionPackageInstallationPlugin.class.php @@ -165,6 +165,24 @@ class ObjectTypeDefinitionPackageInstallationPlugin extends AbstractXMLPackageIn ]); } + /** + * @inheritDoc + * @since 3.2 + */ + protected function getElementData(\DOMElement $element): array { + $data = [ + 'definitionName' => $element->getElementsByTagName('name')->item(0)->nodeValue, + 'packageID' => $this->installation->getPackage()->packageID + ]; + + $interfaceName = $element->getElementsByTagName('interfacename')->item(0); + if ($interfaceName) { + $data['interfaceName'] = $interfaceName->nodeValue; + } + + return $data; + } + /** * @inheritDoc * @since 3.2 -- 2.20.1