‪TYPO3CMS  9.5
Blog.php
Go to the documentation of this file.
1 <?php
3 
4 /*
5  * This file is part of the TYPO3 CMS project.
6  *
7  * It is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License, either version 2
9  * of the License, or any later version.
10  *
11  * For the full copyright and license information, please read the
12  * LICENSE.txt file that was distributed with this source code.
13  *
14  * The TYPO3 project - inspiring people to share!
15  */
16 
18 
23 {
30  protected ‪$title = '';
31 
37  protected ‪$subtitle;
38 
45  protected ‪$description = '';
46 
52  protected ‪$logo = '';
53 
61  protected ‪$posts;
62 
66  protected ‪$categories;
67 
74  protected ‪$administrator;
75 
79  public function ‪__construct()
80  {
81  $this->posts = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
82  $this->categories = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
83  }
84 
88  public function ‪getSubtitle()
89  {
90  return ‪$this->subtitle;
91  }
92 
98  public function ‪setTitle(‪$title)
99  {
100  $this->title = ‪$title;
101  }
102 
108  public function ‪getTitle()
109  {
110  return ‪$this->title;
111  }
112 
116  public function ‪setLogo(‪$logo)
117  {
118  $this->logo = ‪$logo;
119  }
120 
124  public function ‪getLogo()
125  {
126  return ‪$this->logo;
127  }
128 
134  public function ‪setDescription(‪$description)
135  {
136  $this->description = ‪$description;
137  }
138 
144  public function ‪getDescription()
145  {
146  return ‪$this->description;
147  }
148 
154  public function ‪addPost(‪Post $post)
155  {
156  $this->posts->attach($post);
157  }
158 
164  public function ‪removePost(‪Post $postToRemove)
165  {
166  $this->posts->detach($postToRemove);
167  }
168 
172  public function ‪removeAllPosts()
173  {
174  $this->posts = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
175  }
176 
182  public function ‪getPosts()
183  {
184  return ‪$this->posts;
185  }
186 
192  public function ‪addCategory(\‪TYPO3\CMS\‪Extbase\Domain\Model\Category $category)
193  {
194  $this->categories->attach($category);
195  }
196 
202  public function ‪setCategories(‪$categories)
203  {
204  $this->categories = ‪$categories;
205  }
206 
212  public function ‪getCategories()
213  {
214  return ‪$this->categories;
215  }
216 
222  public function ‪removeCategory(\‪TYPO3\CMS\‪Extbase\Domain\Model\Category $category)
223  {
224  $this->categories->detach($category);
225  }
226 
233  {
234  $this->administrator = ‪$administrator;
235  }
236 
242  public function ‪getAdministrator()
243  {
245  }
246 
250  public function ‪setSubtitle(‪$subtitle)
251  {
252  $this->subtitle = ‪$subtitle;
253  }
254 }
‪ExtbaseTeam\BlogExample\Domain\Model\Blog\getSubtitle
‪string getSubtitle()
Definition: Blog.php:81
‪TYPO3\CMS\Extbase\Annotation
Definition: IgnoreValidation.php:4
‪ExtbaseTeam\BlogExample\Domain\Model\Blog\$posts
‪TYPO3 CMS Extbase Persistence ObjectStorage<\ExtbaseTeam\BlogExample\Domain\Model\Post > $posts
Definition: Blog.php:56
‪ExtbaseTeam\BlogExample\Domain\Model\Blog\$subtitle
‪string $subtitle
Definition: Blog.php:35
‪ExtbaseTeam\BlogExample\Domain\Model\Blog\$administrator
‪ExtbaseTeam BlogExample Domain Model Administrator $administrator
Definition: Blog.php:67
‪TYPO3
‪ExtbaseTeam\BlogExample\Domain\Model\Blog\setLogo
‪setLogo($logo)
Definition: Blog.php:109
‪ExtbaseTeam\BlogExample\Domain\Model\Blog\setTitle
‪setTitle($title)
Definition: Blog.php:91
‪ExtbaseTeam\BlogExample\Domain\Model\Blog\getTitle
‪string getTitle()
Definition: Blog.php:101
‪ExtbaseTeam\BlogExample\Domain\Model\Blog\$title
‪string $title
Definition: Blog.php:29
‪ExtbaseTeam\BlogExample\Domain\Model\Blog\removeCategory
‪removeCategory(\TYPO3\CMS\Extbase\Domain\Model\Category $category)
Definition: Blog.php:215
‪TYPO3\CMS\Extbase\DomainObject\AbstractEntity
Definition: AbstractEntity.php:22
‪ExtbaseTeam\BlogExample\Domain\Model\Blog\getDescription
‪string getDescription()
Definition: Blog.php:137
‪ExtbaseTeam\BlogExample\Domain\Model\Blog\setCategories
‪setCategories($categories)
Definition: Blog.php:195
‪ExtbaseTeam\BlogExample\Domain\Model\Blog\setAdministrator
‪setAdministrator(Administrator $administrator)
Definition: Blog.php:225
‪ExtbaseTeam\BlogExample\Domain\Model\Administrator
Definition: Administrator.php:22
‪ExtbaseTeam\BlogExample\Domain\Model\Blog\getAdministrator
‪Administrator getAdministrator()
Definition: Blog.php:235
‪ExtbaseTeam\BlogExample\Domain\Model\Blog\addPost
‪addPost(Post $post)
Definition: Blog.php:147
‪ExtbaseTeam\BlogExample\Domain\Model\Blog\setSubtitle
‪setSubtitle($subtitle)
Definition: Blog.php:243
‪ExtbaseTeam\BlogExample\Domain\Model\Blog\setDescription
‪setDescription($description)
Definition: Blog.php:127
‪ExtbaseTeam\BlogExample\Domain\Model\Blog\getCategories
‪TYPO3 CMS Extbase Persistence ObjectStorage getCategories()
Definition: Blog.php:205
‪ExtbaseTeam\BlogExample\Domain\Model\Blog\addCategory
‪addCategory(\TYPO3\CMS\Extbase\Domain\Model\Category $category)
Definition: Blog.php:185
‪ExtbaseTeam\BlogExample\Domain\Model\Blog
Definition: Blog.php:23
‪ExtbaseTeam\BlogExample\Domain\Model\Post
Definition: Post.php:23
‪ExtbaseTeam\BlogExample\Domain\Model\Blog\$logo
‪string $logo
Definition: Blog.php:48
‪ExtbaseTeam\BlogExample\Domain\Model\Blog\removePost
‪removePost(Post $postToRemove)
Definition: Blog.php:157
‪ExtbaseTeam\BlogExample\Domain\Model\Blog\$categories
‪TYPO3 CMS Extbase Persistence ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\Category > $categories
Definition: Blog.php:60
‪ExtbaseTeam\BlogExample\Domain\Model\Blog\getPosts
‪TYPO3 CMS Extbase Persistence ObjectStorage getPosts()
Definition: Blog.php:175
‪ExtbaseTeam\BlogExample\Domain\Model\Blog\removeAllPosts
‪removeAllPosts()
Definition: Blog.php:165
‪ExtbaseTeam\BlogExample\Domain\Model\Blog\getLogo
‪string getLogo()
Definition: Blog.php:117
‪ExtbaseTeam\BlogExample\Domain\Model\Blog\$description
‪string $description
Definition: Blog.php:42
‪ExtbaseTeam\BlogExample\Domain\Model
Definition: Administrator.php:3
‪ExtbaseTeam\BlogExample\Domain\Model\Blog\__construct
‪__construct()
Definition: Blog.php:72