ksieren 2 éve
szülő
commit
25ebccf782

+ 7 - 0
Classes/Controller/TermController.php

@@ -23,6 +23,13 @@ class TermController extends ActionController
                 $termObj->setUrl($urlObj);
                 $termObj->setUrl($urlObj);
                 $this->termRepository->add($termObj);
                 $this->termRepository->add($termObj);
             }
             }
+            elseif ($term !== '' && $this->termRepository->findByTitle($term)) {
+                $termObj = $this->termRepository->findByUid(($this->termRepository->findByTitle($term))['uid']);
+                $termObj->setCategory($categoryObj);
+                $termObj->setType($typeObj);
+                $termObj->setUrl($urlObj);
+                $this->termRepository->update($termObj);
+            }
         }
         }
     }
     }
 
 

+ 9 - 2
Configuration/Typoscript/settings.typoscript

@@ -1,7 +1,14 @@
 # Module configuration
 # Module configuration
 module.begriffmgt {
 module.begriffmgt {
     persistence {
     persistence {
-      storagePid = {$storagePid}
+        newRecordStoragePid = 0
+        storagePid = 0
+        classes {
+            Meramo\Begriffmgt\Domain\Model\Term {
+                newRecordStoragePid = 0
+                storagePid = 0
+            }
+        }
     }
     }
     view {
     view {
         templateRootPaths.0 = EXT:begriffmgt/Resources/Private/Templates/
         templateRootPaths.0 = EXT:begriffmgt/Resources/Private/Templates/
@@ -11,4 +18,4 @@ module.begriffmgt {
         layoutRootPaths.0 = EXT:begriffmgt/Resources/Private/Layouts/
         layoutRootPaths.0 = EXT:begriffmgt/Resources/Private/Layouts/
         layoutRootPaths.1 = {$module.begriffmgt.view.layoutRootPath}
         layoutRootPaths.1 = {$module.begriffmgt.view.layoutRootPath}
     }
     }
-}
+}

+ 11 - 0
Configuration/Typoscript/setup.typoscript

@@ -0,0 +1,11 @@
+config.tx_extbase {
+    persistence {
+        storagePid = 0
+        classes {
+            Meramo\Begriffmgt\Domain\Model\Term {
+                newRecordStoragePid = 0
+                storagePid = 0
+            }
+        }
+    }
+}

+ 3 - 3
ext_tables.sql

@@ -6,9 +6,9 @@ CREATE TABLE tx_begriffmgt_domain_model_term (
     cruser_id int(11) DEFAULT '0' NOT NULL,
     cruser_id int(11) DEFAULT '0' NOT NULL,
     deleted tinyint(1) unsigned DEFAULT '0' NOT NULL,
     deleted tinyint(1) unsigned DEFAULT '0' NOT NULL,
     hidden tinyint(1) unsigned DEFAULT '0' NOT NULL,
     hidden tinyint(1) unsigned DEFAULT '0' NOT NULL,
-	type int(11) DEFAULT '0' NOT NULL,
-    category int(11) DEFAULT '0' NOT NULL,
-    url int(11) DEFAULT '0' NOT NULL,
+	type int(11) DEFAULT '0',
+    category int(11) DEFAULT '0',
+    url int(11) DEFAULT '0',
 	term text NOT NULL DEFAULT '',
 	term text NOT NULL DEFAULT '',
     PRIMARY KEY (uid)
     PRIMARY KEY (uid)
 );
 );