Skip to content

Commit

Permalink
[TASK] Replace config.persistence.classes typoscript configuration (#71
Browse files Browse the repository at this point in the history
)

See: https://forge.typo3.org/issues/87623
Releases: master
  • Loading branch information
benjaminkott authored May 3, 2019
1 parent ca13a91 commit dfc4767
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 26 deletions.
35 changes: 35 additions & 0 deletions Configuration/Extbase/Persistence/Classes.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php
declare(strict_types = 1);

/*
* This file is part of the package t3g/blog.
*
* For the full copyright and license information, please read the
* LICENSE file that was distributed with this source code.
*/

return [
\T3G\AgencyPack\Blog\Domain\Model\Content::class => [
'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',
],
];
26 changes: 0 additions & 26 deletions ext_typoscript_setup.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}
}

0 comments on commit dfc4767

Please sign in to comment.