diff --git a/Classes/Domain/Model/Post.php b/Classes/Domain/Model/Post.php index 0dc35763..1e237677 100644 --- a/Classes/Domain/Model/Post.php +++ b/Classes/Domain/Model/Post.php @@ -10,18 +10,7 @@ namespace T3G\AgencyPack\Blog\Domain\Model; -/* - * This file is part of the TYPO3 CMS project. - * - * It is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, either version 2 - * of the License, or any later version. - * - * For the full copyright and license information, please read the - * LICENSE.txt file that was distributed with this source code. - * - * The TYPO3 project - inspiring people to share! - */ +use T3G\AgencyPack\Blog\Constants; use T3G\AgencyPack\Blog\Domain\Repository\CommentRepository; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Extbase\Annotation as Extbase; @@ -35,6 +24,13 @@ */ class Post extends AbstractEntity { + /** + * The blog post doktype + * + * @var int + */ + protected $doktype = Constants::DOKTYPE_BLOG_POST; + /** * The blog post title. * @@ -160,6 +156,14 @@ public function initializeObject(): void $this->media = new ObjectStorage(); } + /** + * @return int + */ + public function getDoktype(): ?int + { + return $this->doktype; + } + /** * @param Author $author * @return Post diff --git a/Tests/Unit/Domain/Model/PostTest.php b/Tests/Unit/Domain/Model/PostTest.php new file mode 100644 index 00000000..bbc5b65d --- /dev/null +++ b/Tests/Unit/Domain/Model/PostTest.php @@ -0,0 +1,30 @@ +getDoktype()); + } +}