diff --git a/Configuration/Extbase/Persistence/Classes.php b/Configuration/Extbase/Persistence/Classes.php new file mode 100644 index 00000000..ef7ade7b --- /dev/null +++ b/Configuration/Extbase/Persistence/Classes.php @@ -0,0 +1,35 @@ + [ + 'tableName' => 'tt_content', + ], + \T3G\AgencyPack\Blog\Domain\Model\Post::class => [ + 'tableName' => 'pages', + ], + \T3G\AgencyPack\Blog\Domain\Model\Category::class => [ + 'tableName' => 'sys_category', + ], + \T3G\AgencyPack\Blog\Domain\Model\Comment::class => [ + 'tableName' => 'tx_blog_domain_model_comment', + 'properties' => [ + 'post' => [ + 'fieldName' => 'parentid' + ], + ], + ], + \T3G\AgencyPack\Blog\Domain\Model\Tag::class => [ + 'tableName' => 'tx_blog_domain_model_tag', + ], + \T3G\AgencyPack\Blog\Domain\Model\Author::class => [ + 'tableName' => 'tx_blog_domain_model_author', + ], +]; diff --git a/ext_typoscript_setup.txt b/ext_typoscript_setup.txt index d4848433..89aaf5a3 100644 --- a/ext_typoscript_setup.txt +++ b/ext_typoscript_setup.txt @@ -6,40 +6,14 @@ plugin.tx_blog { config.tx_extbase.persistence { classes { - T3G\AgencyPack\Blog\Domain\Model\Content { - mapping { - tableName = tt_content - } - } - T3G\AgencyPack\Blog\Domain\Model\Post { - mapping { - tableName = pages - columns.crdate.mapOnProperty = crdate - } - } - T3G\AgencyPack\Blog\Domain\Model\Category { - mapping { - tableName = sys_category - } - } T3G\AgencyPack\Blog\Domain\Model\Comment { newRecordStoragePid = {$plugin.tx_blog.settings.storagePid} - mapping { - tableName = tx_blog_domain_model_comment - columns.parentid.mapOnProperty = post - } } T3G\AgencyPack\Blog\Domain\Model\Tag { newRecordStoragePid = {$plugin.tx_blog.settings.storagePid} - mapping { - tableName = tx_blog_domain_model_tag - } } T3G\AgencyPack\Blog\Domain\Model\Author { newRecordStoragePid = {$plugin.tx_blog.settings.storagePid} - mapping { - tableName = tx_blog_domain_model_author - } } } }