TYPO3 CMS  TYPO3_6-2
Blog.php
Go to the documentation of this file.
1 <?php
20 
27  protected $title = '';
28 
35  protected $description = '';
36 
42  protected $logo = '';
43 
51  protected $posts = NULL;
52 
56  protected $categories = NULL;
57 
64  protected $administrator = NULL;
65 
70  public function __construct() {
71  $this->posts = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
72  }
73 
80  public function setTitle($title) {
81  $this->title = $title;
82  }
83 
89  public function getTitle() {
90  return $this->title;
91  }
92 
97  public function setLogo($logo) {
98  $this->logo = $logo;
99  }
100 
104  public function getLogo() {
105  return $this->logo;
106  }
107 
114  public function setDescription($description) {
115  $this->description = $description;
116  }
117 
123  public function getDescription() {
124  return $this->description;
125  }
126 
133  public function addPost(Post $post) {
134  $this->posts->attach($post);
135  }
136 
143  public function removePost(Post $postToRemove) {
144  $this->posts->detach($postToRemove);
145  }
146 
152  public function removeAllPosts() {
153  $this->posts = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
154  }
155 
161  public function getPosts() {
162  return $this->posts;
163  }
164 
170  public function addCategory(\TYPO3\CMS\Extbase\Domain\Model\Category $category) {
171  $this->categories->attach($category);
172  }
173 
179  public function setCategories($categories) {
180  $this->categories = $categories;
181  }
182 
188  public function getCategories() {
189  return $this->categories;
190  }
191 
197  public function removeCategory(\TYPO3\CMS\Extbase\Domain\Model\Category $category) {
198  $this->categories->detach($category);
199  }
200 
208  $this->administrator = $administrator;
209  }
210 
216  public function getAdministrator() {
217  return $this->administrator;
218  }
219 
220 }
221 ?>
removeCategory(\TYPO3\CMS\Extbase\Domain\Model\Category $category)
Definition: Blog.php:197
setAdministrator(Administrator $administrator)
Definition: Blog.php:207
Definition: Post.php:19
addCategory(\TYPO3\CMS\Extbase\Domain\Model\Category $category)
Definition: Blog.php:170