TYPO3 CMS  TYPO3_8-7
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 
66  protected function initStorageObjects()
67  {
73  $this->formats = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
74  }
75 
81  public function getLanguage()
82  {
83  return $this->language;
84  }
85 
92  public function setLanguage($language)
93  {
94  $this->language = $language;
95  return $this;
96  }
97 
103  public function getTitle()
104  {
105  return $this->title;
106  }
107 
114  public function setTitle($title)
115  {
116  $this->title = $title;
117  return $this;
118  }
119 
125  public function getDescription()
126  {
127  return $this->description;
128  }
129 
136  public function setDescription($description)
137  {
138  $this->description = $description;
139  return $this;
140  }
141 
148  public function addFormat(\TYPO3\CMS\Documentation\Domain\Model\DocumentFormat $format)
149  {
150  $this->formats->attach($format);
151  return $this;
152  }
153 
160  public function removeFormat(\TYPO3\CMS\Documentation\Domain\Model\DocumentFormat $formatToRemove)
161  {
162  $this->formats->detach($formatToRemove);
163  return $this;
164  }
165 
171  public function getFormats()
172  {
173  return $this->formats;
174  }
175 
182  public function setFormats(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $formats)
183  {
184  $this->formats = $formats;
185  return $this;
186  }
187 }
setFormats(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $formats)
addFormat(\TYPO3\CMS\Documentation\Domain\Model\DocumentFormat $format)
removeFormat(\TYPO3\CMS\Documentation\Domain\Model\DocumentFormat $formatToRemove)