‪TYPO3CMS  10.4
TtContent.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
24 
29 {
35  protected ‪$uid;
36 
42  protected ‪$pid;
43 
47  protected ‪$header;
48 
55  protected ‪$image;
56 
60  protected ‪$categories;
61 
65  public function ‪__construct()
66  {
67  $this->image = new ‪ObjectStorage();
68  $this->categories = new ‪ObjectStorage();
69  }
70 
76  public function ‪getHeader()
77  {
78  return ‪$this->header;
79  }
80 
86  public function ‪setHeader(‪$header)
87  {
88  $this->header = ‪$header;
89  }
90 
94  public function ‪getImage(): ‪ObjectStorage
95  {
96  return ‪$this->image;
97  }
98 
102  public function ‪setImage(‪ObjectStorage ‪$image)
103  {
104  $this->image = ‪$image;
105  }
106 
112  public function ‪addCategory(Category $category)
113  {
114  $this->categories->attach($category);
115  }
116 
122  public function ‪setCategories(‪$categories)
123  {
124  $this->categories = ‪$categories;
125  }
126 
132  public function ‪getCategories()
133  {
134  return ‪$this->categories;
135  }
136 
142  public function ‪removeCategory(Category $category)
143  {
144  $this->categories->detach($category);
145  }
146 
152  public function ‪__toString()
153  {
154  return $this->‪getHeader();
155  }
156 }
‪ExtbaseTeam\BlogExample\Domain\Model\TtContent\$uid
‪int null $uid
Definition: TtContent.php:34
‪ExtbaseTeam\BlogExample\Domain\Model\TtContent\$header
‪string $header
Definition: TtContent.php:44
‪TYPO3\CMS\Extbase\Annotation
Definition: IgnoreValidation.php:18
‪ExtbaseTeam\BlogExample\Domain\Model\TtContent\removeCategory
‪removeCategory(Category $category)
Definition: TtContent.php:137
‪TYPO3\CMS\Extbase\DomainObject\AbstractEntity
Definition: AbstractEntity.php:23
‪ExtbaseTeam\BlogExample\Domain\Model\TtContent\getHeader
‪string getHeader()
Definition: TtContent.php:71
‪TYPO3\CMS\Extbase\Persistence\ObjectStorage
Definition: ObjectStorage.php:28
‪ExtbaseTeam\BlogExample\Domain\Model\TtContent
Definition: TtContent.php:29
‪ExtbaseTeam\BlogExample\Domain\Model\TtContent\setCategories
‪setCategories($categories)
Definition: TtContent.php:117
‪ExtbaseTeam\BlogExample\Domain\Model\TtContent\__toString
‪string __toString()
Definition: TtContent.php:147
‪ExtbaseTeam\BlogExample\Domain\Model\TtContent\getImage
‪TYPO3 CMS Extbase Persistence ObjectStorage getImage()
Definition: TtContent.php:89
‪ExtbaseTeam\BlogExample\Domain\Model\TtContent\$image
‪TYPO3 CMS Extbase Persistence ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference > $image
Definition: TtContent.php:51
‪ExtbaseTeam\BlogExample\Domain\Model\TtContent\addCategory
‪addCategory(Category $category)
Definition: TtContent.php:107
‪TYPO3\CMS\Extbase\Domain\Model\Category
Definition: Category.php:26
‪ExtbaseTeam\BlogExample\Domain\Model\TtContent\getCategories
‪TYPO3 CMS Extbase Persistence ObjectStorage getCategories()
Definition: TtContent.php:127
‪ExtbaseTeam\BlogExample\Domain\Model\TtContent\setHeader
‪setHeader($header)
Definition: TtContent.php:81
‪ExtbaseTeam\BlogExample\Domain\Model\TtContent\setImage
‪setImage(ObjectStorage $image)
Definition: TtContent.php:97
‪ExtbaseTeam\BlogExample\Domain\Model\TtContent\__construct
‪__construct()
Definition: TtContent.php:60
‪ExtbaseTeam\BlogExample\Domain\Model
Definition: Administrator.php:16
‪ExtbaseTeam\BlogExample\Domain\Model\TtContent\$pid
‪int null $pid
Definition: TtContent.php:40
‪ExtbaseTeam\BlogExample\Domain\Model\TtContent\$categories
‪TYPO3 CMS Extbase Persistence ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\Category > $categories
Definition: TtContent.php:55