‪TYPO3CMS  9.5
TtContent.php
Go to the documentation of this file.
1 <?php
2 declare(strict_types = 1);
3 
5 
6 /*
7  * This file is part of the TYPO3 CMS project.
8  *
9  * It is free software; you can redistribute it and/or modify it under
10  * the terms of the GNU General Public License, either version 2
11  * of the License, or any later version.
12  *
13  * For the full copyright and license information, please read the
14  * LICENSE.txt file that was distributed with this source code.
15  *
16  * The TYPO3 project - inspiring people to share!
17  */
18 
20 
25 {
31  protected ‪$uid = '';
32 
38  protected ‪$pid = '';
39 
43  protected ‪$header;
44 
51  protected ‪$image;
52 
56  protected ‪$categories;
57 
61  public function ‪__construct()
62  {
63  $this->image = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
64  $this->categories = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
65  }
66 
72  public function ‪getUid()
73  {
74  return ‪$this->uid;
75  }
76 
82  public function ‪getPid()
83  {
84  return ‪$this->pid;
85  }
86 
92  public function ‪getHeader()
93  {
94  return ‪$this->header;
95  }
96 
102  public function ‪setHeader(‪$header)
103  {
104  $this->header = ‪$header;
105  }
106 
110  public function ‪getImage(): \‪TYPO3\CMS\‪Extbase\Persistence\ObjectStorage
111  {
112  return ‪$this->image;
113  }
114 
118  public function ‪setImage(\‪TYPO3\CMS\‪Extbase\Persistence\ObjectStorage ‪$image)
119  {
120  $this->image = ‪$image;
121  }
122 
128  public function ‪addCategory(\‪TYPO3\CMS\‪Extbase\Domain\Model\Category $category)
129  {
130  $this->categories->attach($category);
131  }
132 
138  public function ‪setCategories(‪$categories)
139  {
140  $this->categories = ‪$categories;
141  }
142 
148  public function ‪getCategories()
149  {
150  return ‪$this->categories;
151  }
152 
158  public function ‪removeCategory(\‪TYPO3\CMS\‪Extbase\Domain\Model\Category $category)
159  {
160  $this->categories->detach($category);
161  }
162 
168  public function ‪__toString()
169  {
170  return $this->‪getHeader();
171  }
172 }
‪ExtbaseTeam\BlogExample\Domain\Model\TtContent\$header
‪string $header
Definition: TtContent.php:40
‪ExtbaseTeam\BlogExample\Domain\Model\TtContent\$uid
‪string $uid
Definition: TtContent.php:30
‪ExtbaseTeam\BlogExample\Domain\Model\TtContent\$pid
‪string $pid
Definition: TtContent.php:36
‪TYPO3\CMS\Extbase\Annotation
Definition: IgnoreValidation.php:4
‪TYPO3
‪TYPO3\CMS\Extbase\DomainObject\AbstractEntity
Definition: AbstractEntity.php:22
‪ExtbaseTeam\BlogExample\Domain\Model\TtContent\getHeader
‪string getHeader()
Definition: TtContent.php:87
‪ExtbaseTeam\BlogExample\Domain\Model\TtContent\removeCategory
‪removeCategory(\TYPO3\CMS\Extbase\Domain\Model\Category $category)
Definition: TtContent.php:153
‪ExtbaseTeam\BlogExample\Domain\Model\TtContent\addCategory
‪addCategory(\TYPO3\CMS\Extbase\Domain\Model\Category $category)
Definition: TtContent.php:123
‪ExtbaseTeam\BlogExample\Domain\Model\TtContent\getPid
‪string getPid()
Definition: TtContent.php:77
‪ExtbaseTeam\BlogExample\Domain\Model\TtContent\setImage
‪setImage(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $image)
Definition: TtContent.php:113
‪ExtbaseTeam\BlogExample\Domain\Model\TtContent
Definition: TtContent.php:25
‪ExtbaseTeam\BlogExample\Domain\Model\TtContent\setCategories
‪setCategories($categories)
Definition: TtContent.php:133
‪ExtbaseTeam\BlogExample\Domain\Model\TtContent\__toString
‪string __toString()
Definition: TtContent.php:163
‪ExtbaseTeam\BlogExample\Domain\Model\TtContent\getImage
‪TYPO3 CMS Extbase Persistence ObjectStorage getImage()
Definition: TtContent.php:105
‪ExtbaseTeam\BlogExample\Domain\Model\TtContent\getUid
‪string getUid()
Definition: TtContent.php:67
‪ExtbaseTeam\BlogExample\Domain\Model\TtContent\$image
‪TYPO3 CMS Extbase Persistence ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference > $image
Definition: TtContent.php:47
‪ExtbaseTeam\BlogExample\Domain\Model\TtContent\getCategories
‪TYPO3 CMS Extbase Persistence ObjectStorage getCategories()
Definition: TtContent.php:143
‪ExtbaseTeam\BlogExample\Domain\Model\TtContent\setHeader
‪setHeader($header)
Definition: TtContent.php:97
‪ExtbaseTeam\BlogExample\Domain\Model\TtContent\__construct
‪__construct()
Definition: TtContent.php:56
‪ExtbaseTeam\BlogExample\Domain\Model
Definition: Administrator.php:3
‪ExtbaseTeam\BlogExample\Domain\Model\TtContent\$categories
‪TYPO3 CMS Extbase Persistence ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\Category > $categories
Definition: TtContent.php:51