‪TYPO3CMS  11.5
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 
23 
28 {
34  protected ‪$uid;
35 
41  protected ‪$pid;
42 
46  protected ‪$header;
47 
54  protected ‪$image;
55 
59  protected ‪$categories;
60 
64  public function ‪__construct()
65  {
66  $this->image = new ‪ObjectStorage();
67  $this->categories = new ‪ObjectStorage();
68  }
69 
75  public function ‪getHeader(): string
76  {
77  return ‪$this->header;
78  }
79 
85  public function ‪setHeader(‪$header): void
86  {
87  $this->header = ‪$header;
88  }
89 
93  public function ‪getImage(): ‪ObjectStorage
94  {
95  return ‪$this->image;
96  }
97 
101  public function ‪setImage(‪ObjectStorage ‪$image): void
102  {
103  $this->image = ‪$image;
104  }
105 
111  public function ‪addCategory(Category $category): void
112  {
113  $this->categories->attach($category);
114  }
115 
121  public function ‪setCategories(‪$categories): void
122  {
123  $this->categories = ‪$categories;
124  }
125 
131  public function ‪getCategories(): ObjectStorage
132  {
133  return ‪$this->categories;
134  }
135 
141  public function ‪removeCategory(Category $category): void
142  {
143  $this->categories->detach($category);
144  }
145 
151  public function ‪__toString()
152  {
153  return $this->‪getHeader();
154  }
155 }
‪ExtbaseTeam\BlogExample\Domain\Model\TtContent\$uid
‪int null $uid
Definition: TtContent.php:33
‪ExtbaseTeam\BlogExample\Domain\Model\TtContent\$header
‪string $header
Definition: TtContent.php:43
‪ExtbaseTeam\BlogExample\Domain\Model\Category
Definition: Category.php:28
‪TYPO3\CMS\Extbase\Annotation
Definition: IgnoreValidation.php:18
‪ExtbaseTeam\BlogExample\Domain\Model\TtContent\removeCategory
‪removeCategory(Category $category)
Definition: TtContent.php:136
‪TYPO3\CMS\Extbase\DomainObject\AbstractEntity
Definition: AbstractEntity.php:22
‪ExtbaseTeam\BlogExample\Domain\Model\TtContent\getHeader
‪string getHeader()
Definition: TtContent.php:70
‪TYPO3\CMS\Extbase\Persistence\ObjectStorage
Definition: ObjectStorage.php:32
‪ExtbaseTeam\BlogExample\Domain\Model\TtContent
Definition: TtContent.php:28
‪ExtbaseTeam\BlogExample\Domain\Model\TtContent\setCategories
‪setCategories($categories)
Definition: TtContent.php:116
‪ExtbaseTeam\BlogExample\Domain\Model\TtContent\__toString
‪string __toString()
Definition: TtContent.php:146
‪ExtbaseTeam\BlogExample\Domain\Model\TtContent\getImage
‪TYPO3 CMS Extbase Persistence ObjectStorage getImage()
Definition: TtContent.php:88
‪ExtbaseTeam\BlogExample\Domain\Model\TtContent\$image
‪TYPO3 CMS Extbase Persistence ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference > $image
Definition: TtContent.php:50
‪ExtbaseTeam\BlogExample\Domain\Model\TtContent\$categories
‪TYPO3 CMS Extbase Persistence ObjectStorage< Category > $categories
Definition: TtContent.php:54
‪ExtbaseTeam\BlogExample\Domain\Model\TtContent\addCategory
‪addCategory(Category $category)
Definition: TtContent.php:106
‪ExtbaseTeam\BlogExample\Domain\Model\TtContent\getCategories
‪TYPO3 CMS Extbase Persistence ObjectStorage getCategories()
Definition: TtContent.php:126
‪ExtbaseTeam\BlogExample\Domain\Model\TtContent\setHeader
‪setHeader($header)
Definition: TtContent.php:80
‪ExtbaseTeam\BlogExample\Domain\Model\TtContent\setImage
‪setImage(ObjectStorage $image)
Definition: TtContent.php:96
‪ExtbaseTeam\BlogExample\Domain\Model\TtContent\__construct
‪__construct()
Definition: TtContent.php:59
‪ExtbaseTeam\BlogExample\Domain\Model
Definition: Administrator.php:18
‪ExtbaseTeam\BlogExample\Domain\Model\TtContent\$pid
‪int null $pid
Definition: TtContent.php:39