diff --git a/Classes/Domain/Model/MenuItemContent.php b/Classes/Domain/Model/MenuItemContent.php deleted file mode 100644 index 06f0c2e06efd68c3e71ece1f6d29ce5898b020be..0000000000000000000000000000000000000000 --- a/Classes/Domain/Model/MenuItemContent.php +++ /dev/null @@ -1,19 +0,0 @@ -<?php - -namespace NL\NlMenubuilder\Domain\Model; - -/** - * MenuItem - */ -class MenuItemContent extends MenuItem -{ - public const TYPE = 2; - - /** - * Type of the menu item - * - * @var int - * @TYPO3\CMS\Extbase\Annotation\Validate("NotEmpty") - */ - protected $type = self::TYPE; -} diff --git a/Classes/Domain/Model/MenuItemLink.php b/Classes/Domain/Model/MenuItemLink.php deleted file mode 100644 index 0051416e37a2f47c23c337ac61e249d0654a4a43..0000000000000000000000000000000000000000 --- a/Classes/Domain/Model/MenuItemLink.php +++ /dev/null @@ -1,19 +0,0 @@ -<?php - -namespace NL\NlMenubuilder\Domain\Model; - -/** - * MenuItem - */ -class MenuItemLink extends MenuItem -{ - public const TYPE = 1; - - /** - * Type of the menu item - * - * @var int - * @TYPO3\CMS\Extbase\Annotation\Validate("NotEmpty") - */ - protected $type = self::TYPE; -} diff --git a/Classes/Domain/Model/MenuItemPage.php b/Classes/Domain/Model/MenuItemPage.php deleted file mode 100644 index b3618ae25ffa1c8e10704ba37334d50c05da3b37..0000000000000000000000000000000000000000 --- a/Classes/Domain/Model/MenuItemPage.php +++ /dev/null @@ -1,19 +0,0 @@ -<?php - -namespace NL\NlMenubuilder\Domain\Model; - -/** - * MenuItem - */ -class MenuItemPage extends MenuItem -{ - public const TYPE = 0; - - /** - * Type of the menu item - * - * @var int - * @TYPO3\CMS\Extbase\Annotation\Validate("NotEmpty") - */ - protected $type = self::TYPE; -} diff --git a/Configuration/TCA/tx_nlmenubuilder_domain_model_menu.php b/Configuration/TCA/tx_nlmenubuilder_domain_model_menu.php index 6c4245e8511fae26c6bb5725b50f18ab7a428c21..18be5c43ad6b5dc7b625e4007a3dfb310edb7781 100644 --- a/Configuration/TCA/tx_nlmenubuilder_domain_model_menu.php +++ b/Configuration/TCA/tx_nlmenubuilder_domain_model_menu.php @@ -140,21 +140,27 @@ return [ ], 'menu_item' => [ - 'exclude' => false, + 'exclude' => true, 'label' => 'LLL:EXT:nl_menubuilder/Resources/Private/Language/locallang_db.xlf:tx_nlmenubuilder_domain_model_menu.menu_item', 'config' => [ 'type' => 'inline', + 'allowed' => 'menuitem', 'foreign_table' => 'tx_nlmenubuilder_domain_model_menuitem', + 'foreign_sortby' => 'sorting', 'foreign_field' => 'menu', 'minitems' => 0, 'maxitems' => 99, 'appearance' => [ 'collapseAll' => true, 'expandSingle' => true, - 'levelLinksPosition' => 'top', + 'levelLinksPosition' => 'bottom', + 'useSortable' => true, 'showSynchronizationLink' => 1, 'showPossibleLocalizationRecords' => 1, - 'showAllLocalizationLink' => 1 + 'showAllLocalizationLink' => 1, + 'enabledControls' => [ + 'info' => false, + ] ], ], diff --git a/ext_tables.sql b/ext_tables.sql index bdbd919005e1286eea7f2bb385d8048bababefcf..58dd4a3325872bfcf9754ea6e7206ccbe0370c5d 100644 --- a/ext_tables.sql +++ b/ext_tables.sql @@ -27,6 +27,7 @@ CREATE TABLE tx_nlmenubuilder_domain_model_menuitem ( menu int(11) unsigned DEFAULT '0' NOT NULL, + sorting int(11) NOT NULL DEFAULT '0', type int(11) DEFAULT '0' NOT NULL, title varchar(255) DEFAULT '' NOT NULL, subtitle varchar(255) DEFAULT '' NOT NULL,