Explorar el Código

be more generic

ksieren hace 2 años
padre
commit
c84bf9e3cf
Se han modificado 2 ficheros con 15 adiciones y 3 borrados
  1. 5 1
      Configuration/TCA/tx_begriffmgt_domain_model_term.php
  2. 10 2
      ext_tables.sql

+ 5 - 1
Configuration/TCA/tx_begriffmgt_domain_model_term.php

@@ -8,18 +8,22 @@ return [
         'tstamp' => 'tstamp',
         'crdate' => 'crdate',
         'cruser_id' => 'cruser_id',
+        'default_sortby' => 'ORDER BY uid',
         'delete' => 'deleted',
         'enablecolumns' => [
             'disabled' => 'hidden',
             'starttime' => 'starttime',
             'endtime' => 'endtime',
         ],
-        'searchFields' => 'type,category,terms,chatbot_url',
+        'searchFields' => 'type,category,terms,url',
         'typeicon_classes' => [
           'default' => 'begriffe_list_record_icon',
         ],
         'iconfile' => 'EXT:begriffmgt/Resources/Public/Icons/book.png'
     ],
+    'interface' => [
+        'showRecordFieldList' => 'type,category,terms,url',
+    ],
     'types' => [
         '0' => [
           'showitem' => '

+ 10 - 2
ext_tables.sql

@@ -1,6 +1,14 @@
 CREATE TABLE tx_begriffmgt_domain_model_term (
+    uid int(11) unsigned NOT NULL AUTO_INCREMENT,
+    pid int(11) DEFAULT '0' NOT NULL,
+    tstamp int(11) unsigned DEFAULT '0' NOT NULL,
+    crdate int(11) unsigned DEFAULT '0' NOT NULL,
+    cruser_id int(11) DEFAULT '0' NOT NULL,
+    deleted tinyint(1) unsigned DEFAULT '0' NOT NULL,
+    hidden tinyint(1) unsigned DEFAULT '0' NOT NULL,
 	type VARCHAR(255) DEFAULT '' NOT NULL,
 	category VARCHAR(255) DEFAULT '',
 	terms text NOT NULL DEFAULT '',
-	url varchar(255) DEFAULT ''
-);
+	url varchar(255) DEFAULT '',
+    PRIMARY KEY (uid)
+);