TYPO3 CMS  TYPO3_7-6
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 
68  protected function initStorageObjects()
69  {
75  $this->translations = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
76  }
77 
83  public function getPackageKey()
84  {
85  return $this->packageKey;
86  }
87 
94  public function setPackageKey($packageKey)
95  {
96  $this->packageKey = $packageKey;
97  return $this;
98  }
99 
105  public function getExtensionKey()
106  {
107  return $this->extensionKey;
108  }
109 
117  {
118  $this->extensionKey = $extensionKey;
119  return $this;
120  }
121 
127  public function getIcon()
128  {
129  return $this->icon;
130  }
131 
138  public function setIcon($icon)
139  {
140  $this->icon = $icon;
141  return $this;
142  }
143 
150  public function addTranslation(\TYPO3\CMS\Documentation\Domain\Model\DocumentTranslation $translation)
151  {
152  $this->translations->attach($translation);
153  return $this;
154  }
155 
162  public function removeTranslation(\TYPO3\CMS\Documentation\Domain\Model\DocumentTranslation $translationToRemove)
163  {
164  $this->translations->detach($translationToRemove);
165  return $this;
166  }
167 
173  public function getTranslations()
174  {
175  return $this->translations;
176  }
177 
184  public function setTranslations(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $translations)
185  {
186  $this->translations = $translations;
187  return $this;
188  }
189 }
removeTranslation(\TYPO3\CMS\Documentation\Domain\Model\DocumentTranslation $translationToRemove)
Definition: Document.php:162
addTranslation(\TYPO3\CMS\Documentation\Domain\Model\DocumentTranslation $translation)
Definition: Document.php:150
setTranslations(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $translations)
Definition: Document.php:184