Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace GOG\Blog\Domain\Model;
- /***
- *
- * This file is part of the "Blog" 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) 2019
- *
- ***/
- /**
- * Blog
- */
- class Blog extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
- {
- /**
- * Working title
- *
- * @var string
- */
- protected $title = '';
- /**
- * Date
- *
- * @var \DateTime
- */
- protected $writeDate = null;
- /**
- * Blog page
- *
- * @var int
- */
- protected $page = 0;
- /**
- * Tags
- *
- * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<Tag>
- *
- */
- protected $tags;
- /**
- * Title image
- *
- * @var \TYPO3\CMS\Extbase\Domain\Model\FileReference
- * @cascade remove
- */
- protected $titleImage = null;
- /**
- * Fotter images
- *
- * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference>
- * @cascade remove
- */
- protected $footerImages = null;
- /**
- * __construct
- */
- /**
- * Short Description
- *
- * @var string
- */
- protected $shortDescription = '';
- public function __construct()
- {
- //Do not remove the next line: It would break the functionality
- $this->initStorageObjects();
- }
- /**
- * Initializes all ObjectStorage properties
- * Do not modify this method!
- * It will be rewritten on each save in the extension builder
- * You may modify the constructor of this class instead
- *
- * @return void
- */
- protected function initStorageObjects()
- {
- $this->footerImages = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
- // $this->tags = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
- }
- /**
- * Returns the title
- *
- * @return string $title
- */
- public function getTitle()
- {
- return $this->title;
- }
- /**
- * Sets the title
- *
- * @param string $title
- * @return void
- */
- public function setTitle($title)
- {
- $this->title = $title;
- }
- /**
- * Returns the writeDate
- *
- * @return \DateTime $writeDate
- */
- public function getWriteDate()
- {
- return $this->writeDate;
- }
- /**
- * Sets the writeDate
- *
- * @param \DateTime $writeDate
- * @return void
- */
- public function setWriteDate(\DateTime $writeDate)
- {
- $this->writeDate = $writeDate;
- }
- /**
- * Returns the page
- *
- * @return int $page
- */
- public function getPage()
- {
- return $this->page;
- }
- /**
- * Sets the page
- *
- * @param int $page
- * @return void
- */
- public function setPage($page)
- {
- $this->page = $page;
- }
- /**
- * Returns the titleImage
- *
- * @return \TYPO3\CMS\Extbase\Domain\Model\FileReference $titleImage
- */
- public function getTitleImage()
- {
- return $this->titleImage;
- }
- /**
- * Sets the titleImage
- *
- * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $titleImage
- * @return void
- */
- public function setTitleImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $titleImage)
- {
- $this->titleImage = $titleImage;
- }
- /**
- * Adds a FileReference
- *
- * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $footerImage
- * @return void
- */
- public function addFooterImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $footerImage)
- {
- $this->footerImages->attach($footerImage);
- }
- /**
- * Removes a FileReference
- *
- * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $footerImageToRemove The FileReference to be removed
- * @return void
- */
- public function removeFooterImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $footerImageToRemove)
- {
- $this->footerImages->detach($footerImageToRemove);
- }
- /**
- * Returns the footerImages
- *
- * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> $footerImages
- */
- public function getFooterImages()
- {
- return $this->footerImages;
- }
- /**
- * Sets the footerImages
- *
- * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> $footerImages
- * @return void
- */
- public function setFooterImages(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $footerImages)
- {
- $this->footerImages = $footerImages;
- }
- /**
- * Returns the Short Description
- *
- * @return string $shortDescription
- */
- public function getShortDescription()
- {
- return $this->shortDescription;
- }
- /**
- * Sets the Short Description
- *
- * @param string $shortDescription
- * @return void
- */
- public function setShortDescription($shortDescription)
- {
- $this->title = $shortDescription;
- }
- //
- // /**
- // * Adds a Tag
- // *
- // * @param Tag $tag
- // * @return void
- // */
- // public function addTag(Tag $tag)
- // {
- // $this->tags->attach($tag);
- // }
- //
- // /**
- // * Removes a Tag
- // *
- // * @param Tag $tag
- // * @return void
- // */
- // public function removeTag(Tag $tag)
- // {
- // $this->tags->detach($tag);
- // }
- //
- // /**
- // * Returns the Tags
- // *
- // * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<Tag> $tags
- // */
- // public function getTags()
- // {
- // return $this->tags;
- // }
- //
- // /**
- // * Sets the Tags
- // *
- // * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<Tag> $tags
- // * @return void
- // */
- // public function setTags(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $tags)
- // {
- // $this->tags = $tags;
- // }
- }
Advertisement
Add Comment
Please, Sign In to add comment