Update object type definition PIP to save GUI-added/edited entries in DB
authorMatthias Schmidt <gravatronics@live.com>
Sun, 8 Apr 2018 09:50:55 +0000 (11:50 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Sun, 8 Apr 2018 09:50:55 +0000 (11:50 +0200)
See #2545

wcfsetup/install/files/lib/system/package/plugin/ObjectTypeDefinitionPackageInstallationPlugin.class.php

index f69894690d401c704888ea0e87317ea67009a179..ad7dc66abac0cb2ebdaf75f3a97ac070b88a8135 100644 (file)
@@ -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