‪TYPO3CMS  10.4
Blog.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of the TYPO3 CMS project.
5  *
6  * It is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU General Public License, either version 2
8  * of the License, or any later version.
9  *
10  * For the full copyright and license information, please read the
11  * LICENSE.txt file that was distributed with this source code.
12  *
13  * The TYPO3 project - inspiring people to share!
14  */
15 
17 
22 
27 {
34  protected ‪$title = '';
35 
41  protected ‪$subtitle;
42 
49  protected ‪$description = '';
50 
56  protected ‪$logo = '';
57 
65  protected ‪$posts;
66 
70  protected ‪$categories;
71 
78  protected ‪$administrator;
79 
83  public function ‪__construct()
84  {
85  $this->posts = new ‪ObjectStorage();
86  $this->categories = new ‪ObjectStorage();
87  }
88 
92  public function ‪getSubtitle()
93  {
94  return ‪$this->subtitle;
95  }
96 
102  public function ‪setTitle(‪$title)
103  {
104  $this->title = ‪$title;
105  }
106 
112  public function ‪getTitle()
113  {
114  return ‪$this->title;
115  }
116 
120  public function ‪setLogo(‪$logo)
121  {
122  $this->logo = ‪$logo;
123  }
124 
128  public function ‪getLogo()
129  {
130  return ‪$this->logo;
131  }
132 
138  public function ‪setDescription(‪$description)
139  {
140  $this->description = ‪$description;
141  }
142 
148  public function ‪getDescription()
149  {
150  return ‪$this->description;
151  }
152 
158  public function ‪addPost(‪Post $post)
159  {
160  $this->posts->attach($post);
161  }
162 
168  public function ‪removePost(‪Post $postToRemove)
169  {
170  $this->posts->detach($postToRemove);
171  }
172 
176  public function ‪removeAllPosts()
177  {
178  $this->posts = new ‪ObjectStorage();
179  }
180 
186  public function ‪getPosts()
187  {
188  return ‪$this->posts;
189  }
190 
196  public function ‪addCategory(‪Category $category)
197  {
198  $this->categories->attach($category);
199  }
200 
206  public function ‪setCategories(‪$categories)
207  {
208  $this->categories = ‪$categories;
209  }
210 
216  public function ‪getCategories()
217  {
218  return ‪$this->categories;
219  }
220 
226  public function ‪removeCategory(‪Category $category)
227  {
228  $this->categories->detach($category);
229  }
230 
237  {
238  $this->administrator = ‪$administrator;
239  }
240 
246  public function ‪getAdministrator()
247  {
249  }
250 
254  public function ‪setSubtitle(‪$subtitle)
255  {
256  $this->subtitle = ‪$subtitle;
257  }
258 }
‪ExtbaseTeam\BlogExample\Domain\Model\Blog\getSubtitle
‪string getSubtitle()
Definition: Blog.php:85
‪TYPO3\CMS\Extbase\Annotation
Definition: IgnoreValidation.php:18
‪ExtbaseTeam\BlogExample\Domain\Model\Blog\$posts
‪TYPO3 CMS Extbase Persistence ObjectStorage<\ExtbaseTeam\BlogExample\Domain\Model\Post > $posts
Definition: Blog.php:60
‪ExtbaseTeam\BlogExample\Domain\Model\Blog\$subtitle
‪string $subtitle
Definition: Blog.php:39
‪ExtbaseTeam\BlogExample\Domain\Model\Blog\$administrator
‪ExtbaseTeam BlogExample Domain Model Administrator $administrator
Definition: Blog.php:71
‪ExtbaseTeam\BlogExample\Domain\Model\Blog\setLogo
‪setLogo($logo)
Definition: Blog.php:113
‪ExtbaseTeam\BlogExample\Domain\Model\Blog\setTitle
‪setTitle($title)
Definition: Blog.php:95
‪ExtbaseTeam\BlogExample\Domain\Model\Blog\removeCategory
‪removeCategory(Category $category)
Definition: Blog.php:219
‪ExtbaseTeam\BlogExample\Domain\Model\Blog\getTitle
‪string getTitle()
Definition: Blog.php:105
‪ExtbaseTeam\BlogExample\Domain\Model\Blog\$title
‪string $title
Definition: Blog.php:33
‪TYPO3\CMS\Extbase\DomainObject\AbstractEntity
Definition: AbstractEntity.php:23
‪ExtbaseTeam\BlogExample\Domain\Model\Blog\getDescription
‪string getDescription()
Definition: Blog.php:141
‪TYPO3\CMS\Extbase\Persistence\ObjectStorage
Definition: ObjectStorage.php:28
‪ExtbaseTeam\BlogExample\Domain\Model\Blog\setCategories
‪setCategories($categories)
Definition: Blog.php:199
‪ExtbaseTeam\BlogExample\Domain\Model\Blog\setAdministrator
‪setAdministrator(Administrator $administrator)
Definition: Blog.php:229
‪ExtbaseTeam\BlogExample\Domain\Model\Administrator
Definition: Administrator.php:24
‪ExtbaseTeam\BlogExample\Domain\Model\Blog\getAdministrator
‪Administrator getAdministrator()
Definition: Blog.php:239
‪ExtbaseTeam\BlogExample\Domain\Model\Blog\addCategory
‪addCategory(Category $category)
Definition: Blog.php:189
‪ExtbaseTeam\BlogExample\Domain\Model\Blog\addPost
‪addPost(Post $post)
Definition: Blog.php:151
‪ExtbaseTeam\BlogExample\Domain\Model\Blog\setSubtitle
‪setSubtitle($subtitle)
Definition: Blog.php:247
‪ExtbaseTeam\BlogExample\Domain\Model\Blog\setDescription
‪setDescription($description)
Definition: Blog.php:131
‪ExtbaseTeam\BlogExample\Domain\Model\Blog\getCategories
‪TYPO3 CMS Extbase Persistence ObjectStorage getCategories()
Definition: Blog.php:209
‪ExtbaseTeam\BlogExample\Domain\Model\Blog
Definition: Blog.php:27
‪ExtbaseTeam\BlogExample\Domain\Model\Post
Definition: Post.php:27
‪ExtbaseTeam\BlogExample\Domain\Model\Blog\$logo
‪string $logo
Definition: Blog.php:52
‪ExtbaseTeam\BlogExample\Domain\Model\Blog\removePost
‪removePost(Post $postToRemove)
Definition: Blog.php:161
‪TYPO3\CMS\Extbase\Domain\Model\Category
Definition: Category.php:26
‪ExtbaseTeam\BlogExample\Domain\Model\Blog\$categories
‪TYPO3 CMS Extbase Persistence ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\Category > $categories
Definition: Blog.php:64
‪ExtbaseTeam\BlogExample\Domain\Model\Blog\getPosts
‪TYPO3 CMS Extbase Persistence ObjectStorage getPosts()
Definition: Blog.php:179
‪ExtbaseTeam\BlogExample\Domain\Model\Blog\removeAllPosts
‪removeAllPosts()
Definition: Blog.php:169
‪ExtbaseTeam\BlogExample\Domain\Model\Blog\getLogo
‪string getLogo()
Definition: Blog.php:121
‪ExtbaseTeam\BlogExample\Domain\Model\Blog\$description
‪string $description
Definition: Blog.php:46
‪ExtbaseTeam\BlogExample\Domain\Model
Definition: Administrator.php:16
‪ExtbaseTeam\BlogExample\Domain\Model\Blog\__construct
‪__construct()
Definition: Blog.php:76