TYPO3 CMS  TYPO3_8-7
Document.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 {
30  protected $packageKey;
31 
38  protected $extensionKey;
39 
45  protected $icon;
46 
52  protected $translations;
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->translations = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
74  }
75 
81  public function getPackageKey()
82  {
83  return $this->packageKey;
84  }
85 
92  public function setPackageKey($packageKey)
93  {
94  $this->packageKey = $packageKey;
95  return $this;
96  }
97 
103  public function getExtensionKey()
104  {
105  return $this->extensionKey;
106  }
107 
115  {
116  $this->extensionKey = $extensionKey;
117  return $this;
118  }
119 
125  public function getIcon()
126  {
127  return $this->icon;
128  }
129 
136  public function setIcon($icon)
137  {
138  $this->icon = $icon;
139  return $this;
140  }
141 
148  public function addTranslation(\TYPO3\CMS\Documentation\Domain\Model\DocumentTranslation $translation)
149  {
150  $this->translations->attach($translation);
151  return $this;
152  }
153 
160  public function removeTranslation(\TYPO3\CMS\Documentation\Domain\Model\DocumentTranslation $translationToRemove)
161  {
162  $this->translations->detach($translationToRemove);
163  return $this;
164  }
165 
171  public function getTranslations()
172  {
173  return $this->translations;
174  }
175 
182  public function setTranslations(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $translations)
183  {
184  $this->translations = $translations;
185  return $this;
186  }
187 }
removeTranslation(\TYPO3\CMS\Documentation\Domain\Model\DocumentTranslation $translationToRemove)
Definition: Document.php:160
addTranslation(\TYPO3\CMS\Documentation\Domain\Model\DocumentTranslation $translation)
Definition: Document.php:148
setTranslations(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $translations)
Definition: Document.php:182