TYPO3 CMS  TYPO3_8-7
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 
21 {
28  protected $title = '';
29 
35  protected $subtitle;
36 
43  protected $description = '';
44 
50  protected $logo = '';
51 
59  protected $posts = null;
60 
64  protected $categories = null;
65 
72  protected $administrator = null;
73 
77  public function __construct()
78  {
79  $this->posts = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
80  $this->categories = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
81  }
82 
86  public function getSubtitle()
87  {
88  return $this->subtitle;
89  }
90 
96  public function setTitle($title)
97  {
98  $this->title = $title;
99  }
100 
106  public function getTitle()
107  {
108  return $this->title;
109  }
110 
114  public function setLogo($logo)
115  {
116  $this->logo = $logo;
117  }
118 
122  public function getLogo()
123  {
124  return $this->logo;
125  }
126 
132  public function setDescription($description)
133  {
134  $this->description = $description;
135  }
136 
142  public function getDescription()
143  {
144  return $this->description;
145  }
146 
152  public function addPost(Post $post)
153  {
154  $this->posts->attach($post);
155  }
156 
162  public function removePost(Post $postToRemove)
163  {
164  $this->posts->detach($postToRemove);
165  }
166 
170  public function removeAllPosts()
171  {
172  $this->posts = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
173  }
174 
180  public function getPosts()
181  {
182  return $this->posts;
183  }
184 
190  public function addCategory(\TYPO3\CMS\Extbase\Domain\Model\Category $category)
191  {
192  $this->categories->attach($category);
193  }
194 
200  public function setCategories($categories)
201  {
202  $this->categories = $categories;
203  }
204 
210  public function getCategories()
211  {
212  return $this->categories;
213  }
214 
220  public function removeCategory(\TYPO3\CMS\Extbase\Domain\Model\Category $category)
221  {
222  $this->categories->detach($category);
223  }
224 
231  {
232  $this->administrator = $administrator;
233  }
234 
240  public function getAdministrator()
241  {
242  return $this->administrator;
243  }
244 
248  public function setSubtitle($subtitle)
249  {
250  $this->subtitle = $subtitle;
251  }
252 }
removeCategory(\TYPO3\CMS\Extbase\Domain\Model\Category $category)
Definition: Blog.php:220
setAdministrator(Administrator $administrator)
Definition: Blog.php:230
Definition: Post.php:20
addCategory(\TYPO3\CMS\Extbase\Domain\Model\Category $category)
Definition: Blog.php:190