TYPO3 CMS  TYPO3_7-6
DocumentTranslation.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 
23 {
31  protected $language;
32 
38  protected $title;
39 
45  protected $description;
46 
52  protected $formats;
53 
57  public function __construct()
58  {
59  // Do not remove the next line: It would break the functionality
60  $this->initStorageObjects();
61  }
62 
68  protected function initStorageObjects()
69  {
75  $this->formats = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
76  }
77 
83  public function getLanguage()
84  {
85  return $this->language;
86  }
87 
94  public function setLanguage($language)
95  {
96  $this->language = $language;
97  return $this;
98  }
99 
105  public function getTitle()
106  {
107  return $this->title;
108  }
109 
116  public function setTitle($title)
117  {
118  $this->title = $title;
119  return $this;
120  }
121 
127  public function getDescription()
128  {
129  return $this->description;
130  }
131 
138  public function setDescription($description)
139  {
140  $this->description = $description;
141  return $this;
142  }
143 
150  public function addFormat(\TYPO3\CMS\Documentation\Domain\Model\DocumentFormat $format)
151  {
152  $this->formats->attach($format);
153  return $this;
154  }
155 
162  public function removeFormat(\TYPO3\CMS\Documentation\Domain\Model\DocumentFormat $formatToRemove)
163  {
164  $this->formats->detach($formatToRemove);
165  return $this;
166  }
167 
173  public function getFormats()
174  {
175  return $this->formats;
176  }
177 
184  public function setFormats(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $formats)
185  {
186  $this->formats = $formats;
187  return $this;
188  }
189 }
setFormats(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $formats)
addFormat(\TYPO3\CMS\Documentation\Domain\Model\DocumentFormat $format)
removeFormat(\TYPO3\CMS\Documentation\Domain\Model\DocumentFormat $formatToRemove)