From: Matthias Schmidt Date: Sun, 8 Apr 2018 09:50:55 +0000 (+0200) Subject: Update object type definition PIP to save GUI-added/edited entries in DB X-Git-Tag: 5.2.0_Alpha_1~782 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3b24677931abe0b8d45e8d0a68277edb8aeae3c8;p=GitHub%2FWoltLab%2FWCF.git Update object type definition PIP to save GUI-added/edited entries in DB See #2545 --- 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