TYPO3 CMS  TYPO3_7-6
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 
36  protected $description = '';
37 
43  protected $logo = '';
44 
52  protected $posts = null;
53 
57  protected $categories = null;
58 
65  protected $administrator = null;
66 
71  public function __construct()
72  {
73  $this->posts = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
74  }
75 
82  public function setTitle($title)
83  {
84  $this->title = $title;
85  }
86 
92  public function getTitle()
93  {
94  return $this->title;
95  }
96 
101  public function setLogo($logo)
102  {
103  $this->logo = $logo;
104  }
105 
109  public function getLogo()
110  {
111  return $this->logo;
112  }
113 
120  public function setDescription($description)
121  {
122  $this->description = $description;
123  }
124 
130  public function getDescription()
131  {
132  return $this->description;
133  }
134 
141  public function addPost(Post $post)
142  {
143  $this->posts->attach($post);
144  }
145 
152  public function removePost(Post $postToRemove)
153  {
154  $this->posts->detach($postToRemove);
155  }
156 
162  public function removeAllPosts()
163  {
164  $this->posts = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
165  }
166 
172  public function getPosts()
173  {
174  return $this->posts;
175  }
176 
182  public function addCategory(\TYPO3\CMS\Extbase\Domain\Model\Category $category)
183  {
184  $this->categories->attach($category);
185  }
186 
192  public function setCategories($categories)
193  {
194  $this->categories = $categories;
195  }
196 
202  public function getCategories()
203  {
204  return $this->categories;
205  }
206 
212  public function removeCategory(\TYPO3\CMS\Extbase\Domain\Model\Category $category)
213  {
214  $this->categories->detach($category);
215  }
216 
224  {
225  $this->administrator = $administrator;
226  }
227 
233  public function getAdministrator()
234  {
235  return $this->administrator;
236  }
237 }
removeCategory(\TYPO3\CMS\Extbase\Domain\Model\Category $category)
Definition: Blog.php:212
setAdministrator(Administrator $administrator)
Definition: Blog.php:223
Definition: Post.php:20
addCategory(\TYPO3\CMS\Extbase\Domain\Model\Category $category)
Definition: Blog.php:182