Guest User

Untitled

a guest
Sep 20th, 2019
91
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. namespace GOG\Blog\Domain\Model;
  3.  
  4.  
  5. /***
  6.  *
  7.  * This file is part of the "Blog" Extension for TYPO3 CMS.
  8.  *
  9.  * For the full copyright and license information, please read the
  10.  * LICENSE.txt file that was distributed with this source code.
  11.  *
  12.  *  (c) 2019
  13.  *
  14.  ***/
  15. /**
  16.  * Blog
  17.  */
  18. class Blog extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
  19. {
  20.  
  21.     /**
  22.      * Working title
  23.      *
  24.      * @var string
  25.      */
  26.     protected $title = '';
  27.  
  28.     /**
  29.      * Date
  30.      *
  31.      * @var \DateTime
  32.      */
  33.     protected $writeDate = null;
  34.  
  35.     /**
  36.      * Blog page
  37.      *
  38.      * @var int
  39.      */
  40.     protected $page = 0;
  41.  
  42.     /**
  43.      * Tags
  44.      *
  45.      * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<Tag>
  46.      *
  47.      */
  48.     protected $tags;
  49.  
  50.     /**
  51.      * Title image
  52.      *
  53.      * @var \TYPO3\CMS\Extbase\Domain\Model\FileReference
  54.      * @cascade remove
  55.      */
  56.     protected $titleImage = null;
  57.  
  58.     /**
  59.      * Fotter images
  60.      *
  61.      * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference>
  62.      * @cascade remove
  63.      */
  64.     protected $footerImages = null;
  65.  
  66.     /**
  67.      * __construct
  68.      */
  69.  
  70.     /**
  71.      * Short Description
  72.      *
  73.      * @var string
  74.      */
  75.     protected $shortDescription = '';
  76.  
  77.  
  78.     public function __construct()
  79.     {
  80.  
  81.         //Do not remove the next line: It would break the functionality
  82.         $this->initStorageObjects();
  83.     }
  84.  
  85.     /**
  86.      * Initializes all ObjectStorage properties
  87.      * Do not modify this method!
  88.      * It will be rewritten on each save in the extension builder
  89.      * You may modify the constructor of this class instead
  90.      *
  91.      * @return void
  92.      */
  93.     protected function initStorageObjects()
  94.     {
  95.         $this->footerImages = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
  96. //        $this->tags = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
  97.     }
  98.  
  99.     /**
  100.      * Returns the title
  101.      *
  102.      * @return string $title
  103.      */
  104.     public function getTitle()
  105.     {
  106.         return $this->title;
  107.     }
  108.  
  109.     /**
  110.      * Sets the title
  111.      *
  112.      * @param string $title
  113.      * @return void
  114.      */
  115.     public function setTitle($title)
  116.     {
  117.         $this->title = $title;
  118.     }
  119.  
  120.     /**
  121.      * Returns the writeDate
  122.      *
  123.      * @return \DateTime $writeDate
  124.      */
  125.     public function getWriteDate()
  126.     {
  127.         return $this->writeDate;
  128.     }
  129.  
  130.     /**
  131.      * Sets the writeDate
  132.      *
  133.      * @param \DateTime $writeDate
  134.      * @return void
  135.      */
  136.     public function setWriteDate(\DateTime $writeDate)
  137.     {
  138.         $this->writeDate = $writeDate;
  139.     }
  140.  
  141.     /**
  142.      * Returns the page
  143.      *
  144.      * @return int $page
  145.      */
  146.     public function getPage()
  147.     {
  148.         return $this->page;
  149.     }
  150.  
  151.     /**
  152.      * Sets the page
  153.      *
  154.      * @param int $page
  155.      * @return void
  156.      */
  157.     public function setPage($page)
  158.     {
  159.         $this->page = $page;
  160.     }
  161.  
  162.     /**
  163.      * Returns the titleImage
  164.      *
  165.      * @return \TYPO3\CMS\Extbase\Domain\Model\FileReference $titleImage
  166.      */
  167.     public function getTitleImage()
  168.     {
  169.         return $this->titleImage;
  170.     }
  171.  
  172.     /**
  173.      * Sets the titleImage
  174.      *
  175.      * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $titleImage
  176.      * @return void
  177.      */
  178.     public function setTitleImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $titleImage)
  179.     {
  180.         $this->titleImage = $titleImage;
  181.     }
  182.  
  183.     /**
  184.      * Adds a FileReference
  185.      *
  186.      * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $footerImage
  187.      * @return void
  188.      */
  189.     public function addFooterImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $footerImage)
  190.     {
  191.         $this->footerImages->attach($footerImage);
  192.     }
  193.  
  194.     /**
  195.      * Removes a FileReference
  196.      *
  197.      * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $footerImageToRemove The FileReference to be removed
  198.      * @return void
  199.      */
  200.     public function removeFooterImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $footerImageToRemove)
  201.     {
  202.         $this->footerImages->detach($footerImageToRemove);
  203.     }
  204.  
  205.     /**
  206.      * Returns the footerImages
  207.      *
  208.      * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> $footerImages
  209.      */
  210.     public function getFooterImages()
  211.     {
  212.         return $this->footerImages;
  213.     }
  214.  
  215.     /**
  216.      * Sets the footerImages
  217.      *
  218.      * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> $footerImages
  219.      * @return void
  220.      */
  221.     public function setFooterImages(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $footerImages)
  222.     {
  223.         $this->footerImages = $footerImages;
  224.     }
  225.  
  226.     /**
  227.      * Returns the Short Description
  228.      *
  229.      * @return string $shortDescription
  230.      */
  231.     public function getShortDescription()
  232.     {
  233.         return $this->shortDescription;
  234.     }
  235.  
  236.     /**
  237.      * Sets the Short Description
  238.      *
  239.      * @param string $shortDescription
  240.      * @return void
  241.      */
  242.     public function setShortDescription($shortDescription)
  243.     {
  244.         $this->title = $shortDescription;
  245.     }
  246.  
  247.  
  248. //
  249. //    /**
  250. //     * Adds a Tag
  251. //     *
  252. //     * @param Tag $tag
  253. //     * @return void
  254. //     */
  255. //    public function addTag(Tag $tag)
  256. //    {
  257. //        $this->tags->attach($tag);
  258. //    }
  259. //
  260. //    /**
  261. //     * Removes a Tag
  262. //     *
  263. //     * @param Tag $tag
  264. //     * @return void
  265. //     */
  266. //    public function removeTag(Tag $tag)
  267. //    {
  268. //        $this->tags->detach($tag);
  269. //    }
  270. //
  271. //    /**
  272. //     * Returns the Tags
  273. //     *
  274. //     * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<Tag> $tags
  275. //     */
  276. //    public function getTags()
  277. //    {
  278. //        return $this->tags;
  279. //    }
  280. //
  281. //    /**
  282. //     * Sets the Tags
  283. //     *
  284. //     * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<Tag> $tags
  285. //     * @return void
  286. //     */
  287. //    public function setTags(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $tags)
  288. //    {
  289. //        $this->tags = $tags;
  290. //    }
  291. }
RAW Paste Data