Переглянути джерело

Create extension structure

jabongwa 2 роки тому
батько
коміт
00a339c83c
41 змінених файлів з 1665 додано та 3 видалено
  1. 50 0
      Classes/Domain/Model/Category.php
  2. 106 0
      Classes/Domain/Model/Terms.php
  3. 51 0
      Classes/Domain/Model/Type.php
  4. 22 0
      Classes/Domain/Model/Url.php
  5. 27 0
      Classes/Domain/Repository/CategoryRepository.php
  6. 22 0
      Classes/Domain/Repository/TermsRepository.php
  7. 27 0
      Classes/Domain/Repository/TypeRepository.php
  8. 22 0
      Classes/Domain/Repository/UrlRepository.php
  9. 106 0
      Configuration/ExtensionBuilder/settings.yaml
  10. 4 0
      Configuration/TCA/Overrides/sys_template.php
  11. 80 0
      Configuration/TCA/tx_chatbotui_domain_model_category.php
  12. 108 0
      Configuration/TCA/tx_chatbotui_domain_model_terms.php
  13. 80 0
      Configuration/TCA/tx_chatbotui_domain_model_type.php
  14. 68 0
      Configuration/TCA/tx_chatbotui_domain_model_url.php
  15. 15 0
      Configuration/TypoScript/constants.typoscript
  16. 15 0
      Configuration/TypoScript/setup.typoscript
  17. 309 0
      ExtensionBuilder.json
  18. 11 0
      Resources/Private/.htaccess
  19. 35 0
      Resources/Private/Language/locallang.xlf
  20. 14 0
      Resources/Private/Language/locallang_chatbotuimodule.xlf
  21. 11 0
      Resources/Private/Language/locallang_csh_tx_chatbotui_domain_model_category.xlf
  22. 17 0
      Resources/Private/Language/locallang_csh_tx_chatbotui_domain_model_terms.xlf
  23. 11 0
      Resources/Private/Language/locallang_csh_tx_chatbotui_domain_model_type.xlf
  24. 35 0
      Resources/Private/Language/locallang_db.xlf
  25. 4 0
      Resources/Public/Icons/Extension.svg
  26. BIN
      Resources/Public/Icons/relation.gif
  27. BIN
      Resources/Public/Icons/tx_chatbotui_domain_model_category.gif
  28. BIN
      Resources/Public/Icons/tx_chatbotui_domain_model_terms.gif
  29. BIN
      Resources/Public/Icons/tx_chatbotui_domain_model_type.gif
  30. BIN
      Resources/Public/Icons/tx_chatbotui_domain_model_url.gif
  31. 4 0
      Resources/Public/Icons/user_mod_chatbotuimodule.svg
  32. 31 0
      Tests/Functional/BasicTest.php
  33. 55 0
      Tests/Unit/Domain/Model/CategoryTest.php
  34. 108 0
      Tests/Unit/Domain/Model/TermsTest.php
  35. 55 0
      Tests/Unit/Domain/Model/TypeTest.php
  36. 38 0
      Tests/Unit/Domain/Model/UrlTest.php
  37. 47 0
      __composer.json
  38. 3 3
      composer.json
  39. 29 0
      ext_emconf.php
  40. 32 0
      ext_tables.php
  41. 13 0
      ext_tables.sql

+ 50 - 0
Classes/Domain/Model/Category.php

@@ -0,0 +1,50 @@
+<?php
+
+declare(strict_types=1);
+
+namespace Meramo\Chatbotui\Domain\Model;
+
+
+/**
+ * This file is part of the "Chatbot UI" Extension for TYPO3 CMS.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * (c) 2023 Meramo Developer <develop@meramo.de>, Meramo Verlag GmbH
+ */
+
+/**
+ * Chatbot Term Category
+ */
+class Category extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
+{
+
+    /**
+     * category
+     *
+     * @var string
+     */
+    protected $category = '';
+
+    /**
+     * Returns the category
+     *
+     * @return string $category
+     */
+    public function getCategory()
+    {
+        return $this->category;
+    }
+
+    /**
+     * Sets the category
+     *
+     * @param string $category
+     * @return void
+     */
+    public function setCategory(string $category)
+    {
+        $this->category = $category;
+    }
+}

+ 106 - 0
Classes/Domain/Model/Terms.php

@@ -0,0 +1,106 @@
+<?php
+
+declare(strict_types=1);
+
+namespace Meramo\Chatbotui\Domain\Model;
+
+
+/**
+ * This file is part of the "Chatbot UI" Extension for TYPO3 CMS.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * (c) 2023 Meramo Developer <develop@meramo.de>, Meramo Verlag GmbH
+ */
+
+/**
+ * Terms to filter
+ */
+class Terms extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
+{
+
+    /**
+     * Term type
+     *
+     * @var \Meramo\Chatbotui\Domain\Model\Type
+     */
+    protected $type = null;
+
+    /**
+     * Term category
+     *
+     * @var \Meramo\Chatbotui\Domain\Model\Category
+     */
+    protected $category = null;
+
+    /**
+     * Redirect page url
+     *
+     * @var \Meramo\Chatbotui\Domain\Model\Url
+     */
+    protected $url = null;
+
+    /**
+     * Returns the type
+     *
+     * @return \Meramo\Chatbotui\Domain\Model\Type $type
+     */
+    public function getType()
+    {
+        return $this->type;
+    }
+
+    /**
+     * Sets the type
+     *
+     * @param \Meramo\Chatbotui\Domain\Model\Type $type
+     * @return void
+     */
+    public function setType(\Meramo\Chatbotui\Domain\Model\Type $type)
+    {
+        $this->type = $type;
+    }
+
+    /**
+     * Returns the category
+     *
+     * @return \Meramo\Chatbotui\Domain\Model\Category $category
+     */
+    public function getCategory()
+    {
+        return $this->category;
+    }
+
+    /**
+     * Sets the category
+     *
+     * @param \Meramo\Chatbotui\Domain\Model\Category $category
+     * @return void
+     */
+    public function setCategory(\Meramo\Chatbotui\Domain\Model\Category $category)
+    {
+        $this->category = $category;
+    }
+
+    /**
+     * Returns the url
+     *
+     * @return \Meramo\Chatbotui\Domain\Model\Url $url
+     */
+    public function getUrl()
+    {
+        return $this->url;
+    }
+
+    /**
+     * Sets the url
+     *
+     * @param \Meramo\Chatbotui\Domain\Model\Url $url
+     * @return void
+     */
+    public function setUrl(\Meramo\Chatbotui\Domain\Model\Url $url)
+    {
+        $this->url = $url;
+    }
+}

+ 51 - 0
Classes/Domain/Model/Type.php

@@ -0,0 +1,51 @@
+<?php
+
+declare(strict_types=1);
+
+namespace Meramo\Chatbotui\Domain\Model;
+
+
+/**
+ * This file is part of the "Chatbot UI" Extension for TYPO3 CMS.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * (c) 2023 Meramo Developer <develop@meramo.de>, Meramo Verlag GmbH
+ */
+
+/**
+ * Chatbot Term Type
+ */
+class Type extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
+{
+
+    /**
+     * type
+     *
+     * @var string
+     * @TYPO3\CMS\Extbase\Annotation\Validate("NotEmpty")
+     */
+    protected $type = '';
+
+    /**
+     * Returns the type
+     *
+     * @return string $type
+     */
+    public function getType()
+    {
+        return $this->type;
+    }
+
+    /**
+     * Sets the type
+     *
+     * @param string $type
+     * @return void
+     */
+    public function setType(string $type)
+    {
+        $this->type = $type;
+    }
+}

+ 22 - 0
Classes/Domain/Model/Url.php

@@ -0,0 +1,22 @@
+<?php
+
+declare(strict_types=1);
+
+namespace Meramo\Chatbotui\Domain\Model;
+
+
+/**
+ * This file is part of the "Chatbot UI" Extension for TYPO3 CMS.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * (c) 2023 Meramo Developer <develop@meramo.de>, Meramo Verlag GmbH
+ */
+
+/**
+ * Redirect page Url
+ */
+class Url extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
+{
+}

+ 27 - 0
Classes/Domain/Repository/CategoryRepository.php

@@ -0,0 +1,27 @@
+<?php
+
+declare(strict_types=1);
+
+namespace Meramo\Chatbotui\Domain\Repository;
+
+
+/**
+ * This file is part of the "Chatbot UI" Extension for TYPO3 CMS.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * (c) 2023 Meramo Developer <develop@meramo.de>, Meramo Verlag GmbH
+ */
+
+/**
+ * The repository for Categories
+ */
+class CategoryRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
+{
+
+    /**
+     * @var array
+     */
+    protected $defaultOrderings = ['sorting' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING];
+}

+ 22 - 0
Classes/Domain/Repository/TermsRepository.php

@@ -0,0 +1,22 @@
+<?php
+
+declare(strict_types=1);
+
+namespace Meramo\Chatbotui\Domain\Repository;
+
+
+/**
+ * This file is part of the "Chatbot UI" Extension for TYPO3 CMS.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * (c) 2023 Meramo Developer <develop@meramo.de>, Meramo Verlag GmbH
+ */
+
+/**
+ * The repository for Terms
+ */
+class TermsRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
+{
+}

+ 27 - 0
Classes/Domain/Repository/TypeRepository.php

@@ -0,0 +1,27 @@
+<?php
+
+declare(strict_types=1);
+
+namespace Meramo\Chatbotui\Domain\Repository;
+
+
+/**
+ * This file is part of the "Chatbot UI" Extension for TYPO3 CMS.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * (c) 2023 Meramo Developer <develop@meramo.de>, Meramo Verlag GmbH
+ */
+
+/**
+ * The repository for Types
+ */
+class TypeRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
+{
+
+    /**
+     * @var array
+     */
+    protected $defaultOrderings = ['sorting' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING];
+}

+ 22 - 0
Classes/Domain/Repository/UrlRepository.php

@@ -0,0 +1,22 @@
+<?php
+
+declare(strict_types=1);
+
+namespace Meramo\Chatbotui\Domain\Repository;
+
+
+/**
+ * This file is part of the "Chatbot UI" Extension for TYPO3 CMS.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * (c) 2023 Meramo Developer <develop@meramo.de>, Meramo Verlag GmbH
+ */
+
+/**
+ * The repository for Urls
+ */
+class UrlRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
+{
+}

+ 106 - 0
Configuration/ExtensionBuilder/settings.yaml

@@ -0,0 +1,106 @@
+#
+# Extension Builder settings for extension chatbotui
+# generated 2023-04-22T21:50:22Z
+#
+# See http://www.yaml.org/spec/1.2/spec.html
+#
+
+---
+
+#############  Overwrite settings  ###########
+#
+# These settings only apply, if the roundtrip feature of the extension builder
+# is enabled in the extension manager
+#
+# Usage:
+# nesting reflects the file structure
+# a setting applies to a file or recursive to all files and subfolders
+#
+# merge:
+#   means for classes: All properties ,methods and method bodies
+#   of the existing class will be modified according to the new settings
+#   but not overwritten
+#
+#   for locallang xlf files: Existing keys and labels are always
+#   preserved (renaming a property or DomainObject will result in new keys and new labels)
+#
+#   for other files: You will find a Split token at the end of the file
+#   see: \EBT\ExtensionBuilder\Service\RoundTrip::SPLIT_TOKEN
+#
+#   After this token you can write whatever you want and it will be appended
+#   everytime the code is generated
+#
+# keep:
+#   files are never overwritten
+#   These settings may break the functionality of the extension builder!
+#   Handle with care!
+#
+
+#############  Extension settings  ###########
+
+overwriteSettings:
+  Classes:
+    Controller: merge
+    Domain:
+      Model: merge
+      Repository: merge
+
+  Configuration:
+    #TCA merge not possible - use overrides directory
+    #TypoScript: keep
+
+  Resources:
+    Private:
+      #Language: merge
+      #Layouts: keep
+      #Partials: keep
+      #Templates: keep
+      Backend:
+        #Layouts: keep
+        #Partials: keep
+        #Templates: keep
+
+  user_extension.svg: keep
+#  ext_localconf.php: merge
+#  ext_tables.php: merge
+#  ext_tables.sql: merge
+
+## add declare strict types in php files
+declareStrictTypes: true
+
+## use static date attribute in xliff files
+#staticDateInXliffFiles: '2023-04-22T21:50:22Z'
+
+## skip docComment (license header)
+#skipDocComment: false
+
+## list of error codes for warnings that should be ignored
+#ignoreWarnings:
+  #503
+
+#############  settings for classBuilder  #######################
+#
+# here you may define default parent classes for your classes
+# these settings only apply for new generated classes
+# you may also just change the parent class in the generated class file.
+# It will be kept on next code generation, if the overwrite settings
+# are configured to merge it
+#
+#################################################################
+
+classBuilder:
+
+  Controller:
+    parentClass: \TYPO3\CMS\Extbase\Mvc\Controller\ActionController
+
+  Model:
+    AbstractEntity:
+      parentClass: \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
+
+    AbstractValueObject:
+      parentClass: \TYPO3\CMS\Extbase\DomainObject\AbstractValueObject
+
+  Repository:
+    parentClass: \TYPO3\CMS\Extbase\Persistence\Repository
+
+  setDefaultValuesForClassProperties: true

+ 4 - 0
Configuration/TCA/Overrides/sys_template.php

@@ -0,0 +1,4 @@
+<?php
+defined('TYPO3_MODE') || die();
+
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile('chatbotui', 'Configuration/TypoScript', 'Chatbot UI');

+ 80 - 0
Configuration/TCA/tx_chatbotui_domain_model_category.php

@@ -0,0 +1,80 @@
+<?php
+return [
+    'ctrl' => [
+        'title' => 'LLL:EXT:chatbotui/Resources/Private/Language/locallang_db.xlf:tx_chatbotui_domain_model_category',
+        'label' => 'category',
+        'tstamp' => 'tstamp',
+        'crdate' => 'crdate',
+        'cruser_id' => 'cruser_id',
+        'sortby' => 'sorting',
+        'delete' => 'deleted',
+        'enablecolumns' => [
+            'disabled' => 'hidden',
+            'starttime' => 'starttime',
+            'endtime' => 'endtime',
+        ],
+        'searchFields' => 'category',
+        'iconfile' => 'EXT:chatbotui/Resources/Public/Icons/tx_chatbotui_domain_model_category.gif'
+    ],
+    'types' => [
+        '1' => ['showitem' => 'hidden, category, --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access, starttime, endtime'],
+    ],
+    'columns' => [
+        'hidden' => [
+            'exclude' => true,
+            'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.visible',
+            'config' => [
+                'type' => 'check',
+                'renderType' => 'checkboxToggle',
+                'items' => [
+                    [
+                        0 => '',
+                        1 => '',
+                        'invertStateDisplay' => true
+                    ]
+                ],
+            ],
+        ],
+        'starttime' => [
+            'exclude' => true,
+            'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime',
+            'config' => [
+                'type' => 'input',
+                'renderType' => 'inputDateTime',
+                'eval' => 'datetime,int',
+                'default' => 0,
+                'behaviour' => [
+                    'allowLanguageSynchronization' => true
+                ]
+            ],
+        ],
+        'endtime' => [
+            'exclude' => true,
+            'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime',
+            'config' => [
+                'type' => 'input',
+                'renderType' => 'inputDateTime',
+                'eval' => 'datetime,int',
+                'default' => 0,
+                'range' => [
+                    'upper' => mktime(0, 0, 0, 1, 1, 2038)
+                ],
+                'behaviour' => [
+                    'allowLanguageSynchronization' => true
+                ]
+            ],
+        ],
+
+        'category' => [
+            'exclude' => true,
+            'label' => 'LLL:EXT:chatbotui/Resources/Private/Language/locallang_db.xlf:tx_chatbotui_domain_model_category.category',
+            'config' => [
+                'type' => 'input',
+                'size' => 30,
+                'eval' => 'trim',
+                'default' => ''
+            ],
+        ],
+    
+    ],
+];

+ 108 - 0
Configuration/TCA/tx_chatbotui_domain_model_terms.php

@@ -0,0 +1,108 @@
+<?php
+return [
+    'ctrl' => [
+        'title' => 'LLL:EXT:chatbotui/Resources/Private/Language/locallang_db.xlf:tx_chatbotui_domain_model_terms',
+        'label' => 'type',
+        'tstamp' => 'tstamp',
+        'crdate' => 'crdate',
+        'cruser_id' => 'cruser_id',
+        'delete' => 'deleted',
+        'enablecolumns' => [
+            'disabled' => 'hidden',
+            'starttime' => 'starttime',
+            'endtime' => 'endtime',
+        ],
+        'searchFields' => '',
+        'iconfile' => 'EXT:chatbotui/Resources/Public/Icons/tx_chatbotui_domain_model_terms.gif'
+    ],
+    'types' => [
+        '1' => ['showitem' => 'hidden, type, category, url, --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access, starttime, endtime'],
+    ],
+    'columns' => [
+        'hidden' => [
+            'exclude' => true,
+            'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.visible',
+            'config' => [
+                'type' => 'check',
+                'renderType' => 'checkboxToggle',
+                'items' => [
+                    [
+                        0 => '',
+                        1 => '',
+                        'invertStateDisplay' => true
+                    ]
+                ],
+            ],
+        ],
+        'starttime' => [
+            'exclude' => true,
+            'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime',
+            'config' => [
+                'type' => 'input',
+                'renderType' => 'inputDateTime',
+                'eval' => 'datetime,int',
+                'default' => 0,
+                'behaviour' => [
+                    'allowLanguageSynchronization' => true
+                ]
+            ],
+        ],
+        'endtime' => [
+            'exclude' => true,
+            'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime',
+            'config' => [
+                'type' => 'input',
+                'renderType' => 'inputDateTime',
+                'eval' => 'datetime,int',
+                'default' => 0,
+                'range' => [
+                    'upper' => mktime(0, 0, 0, 1, 1, 2038)
+                ],
+                'behaviour' => [
+                    'allowLanguageSynchronization' => true
+                ]
+            ],
+        ],
+
+        'type' => [
+            'exclude' => true,
+            'label' => 'LLL:EXT:chatbotui/Resources/Private/Language/locallang_db.xlf:tx_chatbotui_domain_model_terms.type',
+            'config' => [
+                'type' => 'select',
+                'renderType' => 'selectSingle',
+                'foreign_table' => 'tx_chatbotui_domain_model_type',
+                'default' => 0,
+                'minitems' => 0,
+                'maxitems' => 1,
+            ],
+            
+        ],
+        'category' => [
+            'exclude' => true,
+            'label' => 'LLL:EXT:chatbotui/Resources/Private/Language/locallang_db.xlf:tx_chatbotui_domain_model_terms.category',
+            'config' => [
+                'type' => 'select',
+                'renderType' => 'selectSingle',
+                'foreign_table' => 'tx_chatbotui_domain_model_category',
+                'default' => 0,
+                'minitems' => 0,
+                'maxitems' => 1,
+            ],
+            
+        ],
+        'url' => [
+            'exclude' => true,
+            'label' => 'LLL:EXT:chatbotui/Resources/Private/Language/locallang_db.xlf:tx_chatbotui_domain_model_terms.url',
+            'config' => [
+                'type' => 'select',
+                'renderType' => 'selectSingle',
+                'foreign_table' => 'tx_chatbotui_domain_model_url',
+                'default' => 0,
+                'minitems' => 0,
+                'maxitems' => 1,
+            ],
+
+        ],
+    
+    ],
+];

+ 80 - 0
Configuration/TCA/tx_chatbotui_domain_model_type.php

@@ -0,0 +1,80 @@
+<?php
+return [
+    'ctrl' => [
+        'title' => 'LLL:EXT:chatbotui/Resources/Private/Language/locallang_db.xlf:tx_chatbotui_domain_model_type',
+        'label' => 'type',
+        'tstamp' => 'tstamp',
+        'crdate' => 'crdate',
+        'cruser_id' => 'cruser_id',
+        'sortby' => 'sorting',
+        'delete' => 'deleted',
+        'enablecolumns' => [
+            'disabled' => 'hidden',
+            'starttime' => 'starttime',
+            'endtime' => 'endtime',
+        ],
+        'searchFields' => 'type',
+        'iconfile' => 'EXT:chatbotui/Resources/Public/Icons/tx_chatbotui_domain_model_type.gif'
+    ],
+    'types' => [
+        '1' => ['showitem' => 'hidden, type, --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access, starttime, endtime'],
+    ],
+    'columns' => [
+        'hidden' => [
+            'exclude' => true,
+            'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.visible',
+            'config' => [
+                'type' => 'check',
+                'renderType' => 'checkboxToggle',
+                'items' => [
+                    [
+                        0 => '',
+                        1 => '',
+                        'invertStateDisplay' => true
+                    ]
+                ],
+            ],
+        ],
+        'starttime' => [
+            'exclude' => true,
+            'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime',
+            'config' => [
+                'type' => 'input',
+                'renderType' => 'inputDateTime',
+                'eval' => 'datetime,int',
+                'default' => 0,
+                'behaviour' => [
+                    'allowLanguageSynchronization' => true
+                ]
+            ],
+        ],
+        'endtime' => [
+            'exclude' => true,
+            'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime',
+            'config' => [
+                'type' => 'input',
+                'renderType' => 'inputDateTime',
+                'eval' => 'datetime,int',
+                'default' => 0,
+                'range' => [
+                    'upper' => mktime(0, 0, 0, 1, 1, 2038)
+                ],
+                'behaviour' => [
+                    'allowLanguageSynchronization' => true
+                ]
+            ],
+        ],
+
+        'type' => [
+            'exclude' => false,
+            'label' => 'LLL:EXT:chatbotui/Resources/Private/Language/locallang_db.xlf:tx_chatbotui_domain_model_type.type',
+            'config' => [
+                'type' => 'input',
+                'size' => 30,
+                'eval' => 'trim,required',
+                'default' => ''
+            ],
+        ],
+    
+    ],
+];

+ 68 - 0
Configuration/TCA/tx_chatbotui_domain_model_url.php

@@ -0,0 +1,68 @@
+<?php
+return [
+    'ctrl' => [
+        'title' => 'LLL:EXT:chatbotui/Resources/Private/Language/locallang_db.xlf:tx_chatbotui_domain_model_url',
+        'label' => 'uid',
+        'tstamp' => 'tstamp',
+        'crdate' => 'crdate',
+        'cruser_id' => 'cruser_id',
+        'delete' => 'deleted',
+        'enablecolumns' => [
+            'disabled' => 'hidden',
+            'starttime' => 'starttime',
+            'endtime' => 'endtime',
+        ],
+        'searchFields' => '',
+        'iconfile' => 'EXT:chatbotui/Resources/Public/Icons/tx_chatbotui_domain_model_url.gif'
+    ],
+    'types' => [
+        '1' => ['showitem' => 'hidden, , --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access, starttime, endtime'],
+    ],
+    'columns' => [
+        'hidden' => [
+            'exclude' => true,
+            'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.visible',
+            'config' => [
+                'type' => 'check',
+                'renderType' => 'checkboxToggle',
+                'items' => [
+                    [
+                        0 => '',
+                        1 => '',
+                        'invertStateDisplay' => true
+                    ]
+                ],
+            ],
+        ],
+        'starttime' => [
+            'exclude' => true,
+            'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime',
+            'config' => [
+                'type' => 'input',
+                'renderType' => 'inputDateTime',
+                'eval' => 'datetime,int',
+                'default' => 0,
+                'behaviour' => [
+                    'allowLanguageSynchronization' => true
+                ]
+            ],
+        ],
+        'endtime' => [
+            'exclude' => true,
+            'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime',
+            'config' => [
+                'type' => 'input',
+                'renderType' => 'inputDateTime',
+                'eval' => 'datetime,int',
+                'default' => 0,
+                'range' => [
+                    'upper' => mktime(0, 0, 0, 1, 1, 2038)
+                ],
+                'behaviour' => [
+                    'allowLanguageSynchronization' => true
+                ]
+            ],
+        ],
+
+    ],
+];

+ 15 - 0
Configuration/TypoScript/constants.typoscript

@@ -0,0 +1,15 @@
+
+module.tx_chatbotui_chatbotuimodule {
+    view {
+        # cat=module.tx_chatbotui_chatbotuimodule/file; type=string; label=Path to template root (BE)
+        templateRootPath = EXT:chatbotui/Resources/Private/Backend/Templates/
+        # cat=module.tx_chatbotui_chatbotuimodule/file; type=string; label=Path to template partials (BE)
+        partialRootPath = EXT:chatbotui/Resources/Private/Backend/Partials/
+        # cat=module.tx_chatbotui_chatbotuimodule/file; type=string; label=Path to template layouts (BE)
+        layoutRootPath = EXT:chatbotui/Resources/Private/Backend/Layouts/
+    }
+    persistence {
+        # cat=module.tx_chatbotui_chatbotuimodule//a; type=string; label=Default storage PID
+        storagePid =
+    }
+}

+ 15 - 0
Configuration/TypoScript/setup.typoscript

@@ -0,0 +1,15 @@
+
+# Module configuration
+module.tx_chatbotui_web_chatbotuichatbotuimodule {
+    persistence {
+        storagePid = {$module.tx_chatbotui_chatbotuimodule.persistence.storagePid}
+    }
+    view {
+        templateRootPaths.0 = EXT:chatbotui/Resources/Private/Backend/Templates/
+        templateRootPaths.1 = {$module.tx_chatbotui_chatbotuimodule.view.templateRootPath}
+        partialRootPaths.0 = EXT:chatbotui/Resources/Private/Backend/Partials/
+        partialRootPaths.1 = {$module.tx_chatbotui_chatbotuimodule.view.partialRootPath}
+        layoutRootPaths.0 = EXT:chatbotui/Resources/Private/Backend/Layouts/
+        layoutRootPaths.1 = {$module.tx_chatbotui_chatbotuimodule.view.layoutRootPath}
+    }
+}

+ 309 - 0
ExtensionBuilder.json

@@ -0,0 +1,309 @@
+{
+    "modules": [
+        {
+            "config": {
+                "position": [
+                    323,
+                    393
+                ]
+            },
+            "name": "New Model Object",
+            "value": {
+                "actionGroup": {
+                    "_default0_index": false,
+                    "_default1_list": false,
+                    "_default2_show": false,
+                    "_default3_new_create": false,
+                    "_default4_edit_update": false,
+                    "_default5_delete": false,
+                    "customActions": []
+                },
+                "name": "Type",
+                "objectsettings": {
+                    "addDeletedField": true,
+                    "addHiddenField": true,
+                    "addStarttimeEndtimeFields": true,
+                    "aggregateRoot": true,
+                    "categorizable": false,
+                    "description": "Chatbot Term Type",
+                    "mapToTable": "",
+                    "parentClass": "",
+                    "sorting": true,
+                    "type": "Entity",
+                    "uid": "1345759033040"
+                },
+                "propertyGroup": {
+                    "properties": [
+                        {
+                            "allowedFileTypes": "",
+                            "maxItems": "1",
+                            "propertyDescription": "",
+                            "propertyIsExcludeField": false,
+                            "propertyIsL10nModeExclude": false,
+                            "propertyIsNullable": false,
+                            "propertyIsRequired": true,
+                            "propertyName": "type",
+                            "propertyType": "String",
+                            "uid": "570280359287"
+                        }
+                    ]
+                },
+                "relationGroup": {
+                    "relations": []
+                }
+            }
+        },
+        {
+            "config": {
+                "position": [
+                    572,
+                    397
+                ]
+            },
+            "name": "New Model Object",
+            "value": {
+                "actionGroup": {
+                    "_default0_index": false,
+                    "_default1_list": false,
+                    "_default2_show": false,
+                    "_default3_new_create": false,
+                    "_default4_edit_update": false,
+                    "_default5_delete": false,
+                    "customActions": []
+                },
+                "name": "Category",
+                "objectsettings": {
+                    "addDeletedField": true,
+                    "addHiddenField": true,
+                    "addStarttimeEndtimeFields": true,
+                    "aggregateRoot": true,
+                    "categorizable": false,
+                    "description": "Chatbot Term Category",
+                    "mapToTable": "",
+                    "parentClass": "",
+                    "sorting": true,
+                    "type": "Entity",
+                    "uid": "671866302851"
+                },
+                "propertyGroup": {
+                    "properties": [
+                        {
+                            "allowedFileTypes": "",
+                            "maxItems": "1",
+                            "propertyDescription": "",
+                            "propertyIsExcludeField": true,
+                            "propertyIsL10nModeExclude": false,
+                            "propertyIsNullable": false,
+                            "propertyIsRequired": false,
+                            "propertyName": "category",
+                            "propertyType": "String",
+                            "uid": "1249689158016"
+                        }
+                    ]
+                },
+                "relationGroup": {
+                    "relations": []
+                }
+            }
+        },
+        {
+            "config": {
+                "position": [
+                    571,
+                    72
+                ]
+            },
+            "name": "New Model Object",
+            "value": {
+                "actionGroup": {
+                    "_default0_index": false,
+                    "_default1_list": false,
+                    "_default2_show": false,
+                    "_default3_new_create": false,
+                    "_default4_edit_update": false,
+                    "_default5_delete": false,
+                    "customActions": []
+                },
+                "name": "Url",
+                "objectsettings": {
+                    "addDeletedField": true,
+                    "addHiddenField": true,
+                    "addStarttimeEndtimeFields": true,
+                    "aggregateRoot": true,
+                    "categorizable": false,
+                    "description": "Redirect page Url",
+                    "mapToTable": "",
+                    "parentClass": "",
+                    "sorting": false,
+                    "type": "Entity",
+                    "uid": "848363313541"
+                },
+                "propertyGroup": {
+                    "properties": []
+                },
+                "relationGroup": {
+                    "relations": []
+                }
+            }
+        },
+        {
+            "config": {
+                "position": [
+                    63,
+                    363
+                ]
+            },
+            "name": "New Model Object",
+            "value": {
+                "actionGroup": {
+                    "_default0_index": false,
+                    "_default1_list": false,
+                    "_default2_show": false,
+                    "_default3_new_create": false,
+                    "_default4_edit_update": false,
+                    "_default5_delete": false,
+                    "customActions": []
+                },
+                "name": "Terms",
+                "objectsettings": {
+                    "addDeletedField": true,
+                    "addHiddenField": true,
+                    "addStarttimeEndtimeFields": true,
+                    "aggregateRoot": true,
+                    "categorizable": false,
+                    "description": "Terms to filter",
+                    "mapToTable": "",
+                    "parentClass": "",
+                    "sorting": false,
+                    "type": "Entity",
+                    "uid": "1638797535524"
+                },
+                "propertyGroup": {
+                    "properties": []
+                },
+                "relationGroup": {
+                    "relations": [
+                        {
+                            "foreignRelationClass": "",
+                            "lazyLoading": false,
+                            "propertyIsExcludeField": true,
+                            "relationDescription": "Term type",
+                            "relationName": "type",
+                            "relationType": "manyToOne",
+                            "relationWire": "[wired]",
+                            "renderType": "selectSingle",
+                            "uid": "97036371990"
+                        },
+                        {
+                            "foreignRelationClass": "",
+                            "lazyLoading": false,
+                            "propertyIsExcludeField": true,
+                            "relationDescription": "Term category",
+                            "relationName": "category",
+                            "relationType": "manyToOne",
+                            "relationWire": "[wired]",
+                            "renderType": "selectSingle",
+                            "uid": "929421706310"
+                        },
+                        {
+                            "foreignRelationClass": "",
+                            "lazyLoading": false,
+                            "propertyIsExcludeField": true,
+                            "relationDescription": "Redirect page url",
+                            "relationName": "url",
+                            "relationType": "zeroToOne",
+                            "relationWire": "[wired]",
+                            "renderType": "selectSingle",
+                            "uid": "574716348331"
+                        }
+                    ]
+                }
+            }
+        }
+    ],
+    "properties": {
+        "backendModules": [
+            {
+                "actions": {
+                    "controllerActionCombinations": "Chatbotui => list"
+                },
+                "description": "Chatbot Term Manager",
+                "key": "chatbotuimodule",
+                "mainModule": "web",
+                "name": "Chatbot UI Module",
+                "tabLabel": "Chatbot UI"
+            }
+        ],
+        "description": "Chatbot Term Manager",
+        "emConf": {
+            "category": "module",
+            "custom_category": "",
+            "dependsOn": "typo3 => 10.4.0-10.4.99\n",
+            "disableLocalization": true,
+            "disableVersioning": true,
+            "generateDocumentationTemplate": true,
+            "sourceLanguage": "en",
+            "state": "alpha",
+            "targetVersion": "10.4.0-10.4.99",
+            "version": "1.0.0"
+        },
+        "extensionKey": "chatbotui",
+        "name": "Chatbot UI",
+        "originalExtensionKey": "",
+        "originalVendorName": "",
+        "persons": [
+            {
+                "company": "Meramo Verlag GmbH",
+                "email": "develop@meramo.de",
+                "name": "Meramo Developer",
+                "role": "Developer"
+            }
+        ],
+        "plugins": [],
+        "vendorName": "Meramo"
+    },
+    "wires": [
+        {
+            "src": {
+                "moduleId": 3,
+                "terminal": "relationWire_0",
+                "uid": "97036371990"
+            },
+            "tgt": {
+                "moduleId": 0,
+                "terminal": "SOURCES",
+                "uid": "1345759033040"
+            }
+        },
+        {
+            "src": {
+                "moduleId": 3,
+                "terminal": "relationWire_1",
+                "uid": "929421706310"
+            },
+            "tgt": {
+                "moduleId": 1,
+                "terminal": "SOURCES",
+                "uid": "671866302851"
+            }
+        },
+        {
+            "src": {
+                "moduleId": 3,
+                "terminal": "relationWire_2",
+                "uid": "574716348331"
+            },
+            "tgt": {
+                "moduleId": 2,
+                "terminal": "SOURCES",
+                "uid": "848363313541"
+            }
+        }
+    ],
+    "storagePath": "\/var\/www\/html\/testbed\/public\/typo3conf\/ext\/",
+    "log": {
+        "last_modified": "2023-04-22 10:07",
+        "extension_builder_version": "10.0.1",
+        "be_user": " (1)"
+    }
+}

+ 11 - 0
Resources/Private/.htaccess

@@ -0,0 +1,11 @@
+# Apache < 2.3
+<IfModule !mod_authz_core.c>
+	Order allow,deny
+	Deny from all
+	Satisfy All
+</IfModule>
+
+# Apache >= 2.3
+<IfModule mod_authz_core.c>
+	Require all denied
+</IfModule>

+ 35 - 0
Resources/Private/Language/locallang.xlf

@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<xliff version="1.0">
+	<file source-language="en" datatype="plaintext" original="EXT:chatbotui/Resources/Private/Language/locallang" date="2023-04-22T22:07:56Z" product-name="chatbotui">
+		<header/>
+		<body>
+			<trans-unit id="tx_chatbotui_domain_model_type" resname="tx_chatbotui_domain_model_type">
+				<source>Type</source>
+			</trans-unit>
+			<trans-unit id="tx_chatbotui_domain_model_type.type" resname="tx_chatbotui_domain_model_type.type">
+				<source>Type</source>
+			</trans-unit>
+			<trans-unit id="tx_chatbotui_domain_model_category" resname="tx_chatbotui_domain_model_category">
+				<source>Category</source>
+			</trans-unit>
+			<trans-unit id="tx_chatbotui_domain_model_category.category" resname="tx_chatbotui_domain_model_category.category">
+				<source>Category</source>
+			</trans-unit>
+			<trans-unit id="tx_chatbotui_domain_model_url" resname="tx_chatbotui_domain_model_url">
+				<source>Url</source>
+			</trans-unit>
+			<trans-unit id="tx_chatbotui_domain_model_terms" resname="tx_chatbotui_domain_model_terms">
+				<source>Terms</source>
+			</trans-unit>
+			<trans-unit id="tx_chatbotui_domain_model_terms.type" resname="tx_chatbotui_domain_model_terms.type">
+				<source>Type</source>
+			</trans-unit>
+			<trans-unit id="tx_chatbotui_domain_model_terms.category" resname="tx_chatbotui_domain_model_terms.category">
+				<source>Category</source>
+			</trans-unit>
+			<trans-unit id="tx_chatbotui_domain_model_terms.url" resname="tx_chatbotui_domain_model_terms.url">
+				<source>Url</source>
+			</trans-unit>
+		</body>
+	</file>
+</xliff>

+ 14 - 0
Resources/Private/Language/locallang_chatbotuimodule.xlf

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<xliff version="1.0">
+	<file source-language="en" datatype="plaintext" original="EXT:chatbotui/Resources/Private/Language/locallang_mod" date="2023-04-22T22:07:56Z" product-name="chatbotui">
+		<header/>
+		<body>
+			<trans-unit id="mlang_labels_tabdescr" resname="mlang_labels_tabdescr">
+				<source>Chatbot Term Manager</source>
+			</trans-unit>
+			<trans-unit id="mlang_tabs_tab" resname="mlang_tabs_tab">
+				<source>Chatbot UI</source>
+			</trans-unit>
+		</body>
+	</file>
+</xliff>

+ 11 - 0
Resources/Private/Language/locallang_csh_tx_chatbotui_domain_model_category.xlf

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<xliff version="1.0">
+	<file source-language="en" datatype="plaintext" original="EXT:chatbotui/Resources/Private/Language/locallang_csh" date="2023-04-22T22:07:56Z" product-name="chatbotui">
+		<header/>
+		<body>
+			<trans-unit id="category.description" resname="category.description">
+				<source>category</source>
+			</trans-unit>
+		</body>
+	</file>
+</xliff>

+ 17 - 0
Resources/Private/Language/locallang_csh_tx_chatbotui_domain_model_terms.xlf

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<xliff version="1.0">
+	<file source-language="en" datatype="plaintext" original="EXT:chatbotui/Resources/Private/Language/locallang_csh" date="2023-04-22T22:07:56Z" product-name="chatbotui">
+		<header/>
+		<body>
+			<trans-unit id="type.description" resname="type.description">
+				<source>Term type</source>
+			</trans-unit>
+			<trans-unit id="category.description" resname="category.description">
+				<source>Term category</source>
+			</trans-unit>
+			<trans-unit id="url.description" resname="url.description">
+				<source>Redirect page url</source>
+			</trans-unit>
+		</body>
+	</file>
+</xliff>

+ 11 - 0
Resources/Private/Language/locallang_csh_tx_chatbotui_domain_model_type.xlf

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<xliff version="1.0">
+	<file source-language="en" datatype="plaintext" original="EXT:chatbotui/Resources/Private/Language/locallang_csh" date="2023-04-22T22:07:56Z" product-name="chatbotui">
+		<header/>
+		<body>
+			<trans-unit id="type.description" resname="type.description">
+				<source>type</source>
+			</trans-unit>
+		</body>
+	</file>
+</xliff>

+ 35 - 0
Resources/Private/Language/locallang_db.xlf

@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<xliff version="1.0">
+	<file source-language="en" datatype="plaintext" original="EXT:chatbotui/Resources/Private/Language/locallang_db" date="2023-04-22T22:07:56Z" product-name="chatbotui">
+		<header/>
+		<body>
+			<trans-unit id="tx_chatbotui_domain_model_type" resname="tx_chatbotui_domain_model_type">
+				<source>Type</source>
+			</trans-unit>
+			<trans-unit id="tx_chatbotui_domain_model_type.type" resname="tx_chatbotui_domain_model_type.type">
+				<source>Type</source>
+			</trans-unit>
+			<trans-unit id="tx_chatbotui_domain_model_category" resname="tx_chatbotui_domain_model_category">
+				<source>Category</source>
+			</trans-unit>
+			<trans-unit id="tx_chatbotui_domain_model_category.category" resname="tx_chatbotui_domain_model_category.category">
+				<source>Category</source>
+			</trans-unit>
+			<trans-unit id="tx_chatbotui_domain_model_url" resname="tx_chatbotui_domain_model_url">
+				<source>Url</source>
+			</trans-unit>
+			<trans-unit id="tx_chatbotui_domain_model_terms" resname="tx_chatbotui_domain_model_terms">
+				<source>Terms</source>
+			</trans-unit>
+			<trans-unit id="tx_chatbotui_domain_model_terms.type" resname="tx_chatbotui_domain_model_terms.type">
+				<source>Type</source>
+			</trans-unit>
+			<trans-unit id="tx_chatbotui_domain_model_terms.category" resname="tx_chatbotui_domain_model_terms.category">
+				<source>Category</source>
+			</trans-unit>
+			<trans-unit id="tx_chatbotui_domain_model_terms.url" resname="tx_chatbotui_domain_model_terms.url">
+				<source>Url</source>
+			</trans-unit>
+		</body>
+	</file>
+</xliff>

+ 4 - 0
Resources/Public/Icons/Extension.svg

@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
+  <path fill="#666" d="M12.053 11.026c-.238.07-.427.095-.674.095-2.033 0-5.017-7.1-5.017-9.462 0-.87.207-1.16.497-1.41C4.373.54 1.39 1.452.435 2.613c-.207.29-.332.746-.332 1.326C.103 7.628 4.04 16 6.82 16c1.283 0 3.45-2.114 5.233-4.974M10.756 0c2.57 0 5.14.415 5.14 1.865 0 2.943-1.865 6.508-2.818 6.508-1.7 0-3.814-4.725-3.814-7.088C9.264.207 9.68 0 10.756 0"></path>
+</svg>

BIN
Resources/Public/Icons/relation.gif


BIN
Resources/Public/Icons/tx_chatbotui_domain_model_category.gif


BIN
Resources/Public/Icons/tx_chatbotui_domain_model_terms.gif


BIN
Resources/Public/Icons/tx_chatbotui_domain_model_type.gif


BIN
Resources/Public/Icons/tx_chatbotui_domain_model_url.gif


+ 4 - 0
Resources/Public/Icons/user_mod_chatbotuimodule.svg

@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
+  <path fill="#666" d="M12.053 11.026c-.238.07-.427.095-.674.095-2.033 0-5.017-7.1-5.017-9.462 0-.87.207-1.16.497-1.41C4.373.54 1.39 1.452.435 2.613c-.207.29-.332.746-.332 1.326C.103 7.628 4.04 16 6.82 16c1.283 0 3.45-2.114 5.233-4.974M10.756 0c2.57 0 5.14.415 5.14 1.865 0 2.943-1.865 6.508-2.818 6.508-1.7 0-3.814-4.725-3.814-7.088C9.264.207 9.68 0 10.756 0"></path>
+</svg>

+ 31 - 0
Tests/Functional/BasicTest.php

@@ -0,0 +1,31 @@
+<?php
+declare(strict_types=1);
+
+namespace Meramo\Chatbotui\Tests\Functional;
+
+use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase;
+
+/**
+ * Test case
+ *
+ * @author Meramo Developer <develop@meramo.de>
+ */
+class BasicTest extends FunctionalTestCase
+{
+    /**
+     * @var array
+     */
+    protected $testExtensionsToLoad = [
+        'typo3conf/ext/chatbotui',
+    ];
+
+    /**
+     * Just a dummy to show that at least one test is actually executed
+     *
+     * @test
+     */
+    public function dummy()
+    {
+        $this->assertTrue(true);
+    }
+}

+ 55 - 0
Tests/Unit/Domain/Model/CategoryTest.php

@@ -0,0 +1,55 @@
+<?php
+declare(strict_types=1);
+
+namespace Meramo\Chatbotui\Tests\Unit\Domain\Model;
+
+use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
+
+/**
+ * Test case
+ *
+ * @author Meramo Developer <develop@meramo.de>
+ */
+class CategoryTest extends UnitTestCase
+{
+    /**
+     * @var \Meramo\Chatbotui\Domain\Model\Category
+     */
+    protected $subject;
+
+    protected function setUp()
+    {
+        parent::setUp();
+        $this->subject = new \Meramo\Chatbotui\Domain\Model\Category();
+    }
+
+    protected function tearDown()
+    {
+        parent::tearDown();
+    }
+
+    /**
+     * @test
+     */
+    public function getCategoryReturnsInitialValueForString()
+    {
+        self::assertSame(
+            '',
+            $this->subject->getCategory()
+        );
+    }
+
+    /**
+     * @test
+     */
+    public function setCategoryForStringSetsCategory()
+    {
+        $this->subject->setCategory('Conceived at T3CON10');
+
+        self::assertAttributeEquals(
+            'Conceived at T3CON10',
+            'category',
+            $this->subject
+        );
+    }
+}

+ 108 - 0
Tests/Unit/Domain/Model/TermsTest.php

@@ -0,0 +1,108 @@
+<?php
+declare(strict_types=1);
+
+namespace Meramo\Chatbotui\Tests\Unit\Domain\Model;
+
+use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
+
+/**
+ * Test case
+ *
+ * @author Meramo Developer <develop@meramo.de>
+ */
+class TermsTest extends UnitTestCase
+{
+    /**
+     * @var \Meramo\Chatbotui\Domain\Model\Terms
+     */
+    protected $subject;
+
+    protected function setUp()
+    {
+        parent::setUp();
+        $this->subject = new \Meramo\Chatbotui\Domain\Model\Terms();
+    }
+
+    protected function tearDown()
+    {
+        parent::tearDown();
+    }
+
+    /**
+     * @test
+     */
+    public function getTypeReturnsInitialValueForType()
+    {
+        self::assertEquals(
+            null,
+            $this->subject->getType()
+        );
+    }
+
+    /**
+     * @test
+     */
+    public function setTypeForTypeSetsType()
+    {
+        $typeFixture = new \Meramo\Chatbotui\Domain\Model\Type();
+        $this->subject->setType($typeFixture);
+
+        self::assertAttributeEquals(
+            $typeFixture,
+            'type',
+            $this->subject
+        );
+    }
+
+    /**
+     * @test
+     */
+    public function getCategoryReturnsInitialValueForCategory()
+    {
+        self::assertEquals(
+            null,
+            $this->subject->getCategory()
+        );
+    }
+
+    /**
+     * @test
+     */
+    public function setCategoryForCategorySetsCategory()
+    {
+        $categoryFixture = new \Meramo\Chatbotui\Domain\Model\Category();
+        $this->subject->setCategory($categoryFixture);
+
+        self::assertAttributeEquals(
+            $categoryFixture,
+            'category',
+            $this->subject
+        );
+    }
+
+    /**
+     * @test
+     */
+    public function getUrlReturnsInitialValueForUrl()
+    {
+        self::assertEquals(
+            null,
+            $this->subject->getUrl()
+        );
+    }
+
+    /**
+     * @test
+     */
+    public function setUrlForUrlSetsUrl()
+    {
+        $urlFixture = new \Meramo\Chatbotui\Domain\Model\Url();
+        $this->subject->setUrl($urlFixture);
+
+        self::assertAttributeEquals(
+            $urlFixture,
+            'url',
+            $this->subject
+        );
+    }
+}

+ 55 - 0
Tests/Unit/Domain/Model/TypeTest.php

@@ -0,0 +1,55 @@
+<?php
+declare(strict_types=1);
+
+namespace Meramo\Chatbotui\Tests\Unit\Domain\Model;
+
+use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
+
+/**
+ * Test case
+ *
+ * @author Meramo Developer <develop@meramo.de>
+ */
+class TypeTest extends UnitTestCase
+{
+    /**
+     * @var \Meramo\Chatbotui\Domain\Model\Type
+     */
+    protected $subject;
+
+    protected function setUp()
+    {
+        parent::setUp();
+        $this->subject = new \Meramo\Chatbotui\Domain\Model\Type();
+    }
+
+    protected function tearDown()
+    {
+        parent::tearDown();
+    }
+
+    /**
+     * @test
+     */
+    public function getTypeReturnsInitialValueForString()
+    {
+        self::assertSame(
+            '',
+            $this->subject->getType()
+        );
+    }
+
+    /**
+     * @test
+     */
+    public function setTypeForStringSetsType()
+    {
+        $this->subject->setType('Conceived at T3CON10');
+
+        self::assertAttributeEquals(
+            'Conceived at T3CON10',
+            'type',
+            $this->subject
+        );
+    }
+}

+ 38 - 0
Tests/Unit/Domain/Model/UrlTest.php

@@ -0,0 +1,38 @@
+<?php
+declare(strict_types=1);
+
+namespace Meramo\Chatbotui\Tests\Unit\Domain\Model;
+
+use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
+
+/**
+ * Test case
+ *
+ * @author Meramo Developer <develop@meramo.de>
+ */
+class UrlTest extends UnitTestCase
+{
+    /**
+     * @var \Meramo\Chatbotui\Domain\Model\Url
+     */
+    protected $subject;
+
+    protected function setUp()
+    {
+        parent::setUp();
+        $this->subject = new \Meramo\Chatbotui\Domain\Model\Url();
+    }
+
+    protected function tearDown()
+    {
+        parent::tearDown();
+    }
+
+    /**
+     * @test
+     */
+    public function dummyTestToNotLeaveThisFileEmpty()
+    {
+        self::markTestIncomplete();
+    }
+}

+ 47 - 0
__composer.json

@@ -0,0 +1,47 @@
+{
+    "name": "meramo/chatbotui",
+    "type": "typo3-cms-extension",
+    "description": "Chatbot Term Manager",
+    "authors": [
+        {
+            "name": "Meramo Developer",
+            "role": "Developer"
+        }
+    ],
+    "license": "GPL-2.0-or-later",
+    "require": {
+        "typo3/cms-core": "^10.4"
+    },
+    "require-dev": {
+        "typo3/testing-framework": "^6.8"
+    },
+    "autoload": {
+        "psr-4": {
+            "Meramo\\Chatbotui\\": "Classes"
+        }
+    },
+    "autoload-dev": {
+        "psr-4": {
+            "Meramo\\Chatbotui\\Tests\\": "Tests"
+        }
+    },
+    "replace": {
+        "typo3-ter/chatbotui": "self.version"
+    },
+    "config": {
+        "vendor-dir": ".Build/vendor",
+        "bin-dir": ".Build/bin"
+    },
+    "scripts": {
+        "post-autoload-dump": [
+            "TYPO3\\TestingFramework\\Composer\\ExtensionTestEnvironment::prepare"
+        ]
+    },
+    "extra": {
+        "typo3/cms": {
+            "cms-package-dir": "{$vendor-dir}/typo3/cms",
+            "web-dir": ".Build/public",
+            "extension-key": "chatbotui"
+        }
+    }
+}

+ 3 - 3
composer.json

@@ -1,7 +1,7 @@
 {
-  "name": "meramo/chatbotuimodule",
+  "name": "meramo/chatbotui",
   "license": "GPL-3.0",
-  "description": "Module um Chatbot Begriffe in der Datenbank zu schreiben",
+  "description": "Module to Manage Chatbot Terms",
   "require": {
     "php": ">=7.0.0",
     "typo3/cms-core": "^8.7 || ^9.5 || ^10.4"
@@ -15,7 +15,7 @@
   },
   "extra": {
     "typo3/cms": {
-      "extension-key": "chatbotbuimodule"
+      "extension-key": "chatbotbui"
     }
   }
 }

+ 29 - 0
ext_emconf.php

@@ -0,0 +1,29 @@
+<?php
+
+/***************************************************************
+ * Extension Manager/Repository config file for ext: "chatbotui"
+ *
+ * Auto generated by Extension Builder 2023-04-22
+ *
+ * Manual updates:
+ * Only the data in the array - anything else is removed by next write.
+ * "version" and "dependencies" must not be touched!
+ ***************************************************************/
+
+$EM_CONF[$_EXTKEY] = [
+    'title' => 'Chatbot UI',
+    'description' => 'Chatbot Term Manager',
+    'category' => 'module',
+    'author' => 'Meramo Developer',
+    'author_email' => 'develop@meramo.de',
+    'state' => 'alpha',
+    'clearCacheOnLoad' => 0,
+    'version' => '1.0.0',
+    'constraints' => [
+        'depends' => [
+            'typo3' => '10.4.0-10.4.99',
+        ],
+        'conflicts' => [],
+        'suggests' => [],
+    ],
+];

+ 32 - 0
ext_tables.php

@@ -0,0 +1,32 @@
+<?php
+defined('TYPO3_MODE') || die();
+
+call_user_func(static function() {
+    \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
+        'Chatbotui',
+        'web',
+        'chatbotuimodule',
+        '',
+        [
+            \Meramo\Chatbotui\Controller\ChatbotuiController::class => 'list',
+            
+        ],
+        [
+            'access' => 'user,group',
+            'icon'   => 'EXT:chatbotui/Resources/Public/Icons/user_mod_chatbotuimodule.svg',
+            'labels' => 'LLL:EXT:chatbotui/Resources/Private/Language/locallang_chatbotuimodule.xlf',
+        ]
+    );
+
+    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_chatbotui_domain_model_type', 'EXT:chatbotui/Resources/Private/Language/locallang_csh_tx_chatbotui_domain_model_type.xlf');
+    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_chatbotui_domain_model_type');
+
+    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_chatbotui_domain_model_category', 'EXT:chatbotui/Resources/Private/Language/locallang_csh_tx_chatbotui_domain_model_category.xlf');
+    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_chatbotui_domain_model_category');
+
+    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_chatbotui_domain_model_url', 'EXT:chatbotui/Resources/Private/Language/locallang_csh_tx_chatbotui_domain_model_url.xlf');
+    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_chatbotui_domain_model_url');
+
+    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_chatbotui_domain_model_terms', 'EXT:chatbotui/Resources/Private/Language/locallang_csh_tx_chatbotui_domain_model_terms.xlf');
+    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_chatbotui_domain_model_terms');
+});

+ 13 - 0
ext_tables.sql

@@ -0,0 +1,13 @@
+CREATE TABLE tx_chatbotui_domain_model_type (
+	type varchar(255) NOT NULL DEFAULT ''
+);
+
+CREATE TABLE tx_chatbotui_domain_model_category (
+	category varchar(255) NOT NULL DEFAULT ''
+);
+
+CREATE TABLE tx_chatbotui_domain_model_terms (
+	type int(11) unsigned DEFAULT '0',
+	category int(11) unsigned DEFAULT '0',
+	url int(11) unsigned DEFAULT '0'
+);