TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
lang/Classes/Domain/Model/Extension.php
Go to the documentation of this file.
1 <?php
2 namespace TYPO3\CMS\Lang\Domain\Model;
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 
19 
24 {
28  protected $key = '';
29 
33  protected $title = '';
34 
38  protected $icon = '';
39 
43  protected $iconWidth = 28;
44 
48  protected $iconHeight = 28;
49 
53  protected $version = '';
54 
58  protected $updateResult = [];
59 
67  public function __construct($key = '', $title= '', $icon = '')
68  {
69  $this->setKey($key);
70  $this->setTitle($title);
71  $this->setIcon($icon);
72  }
73 
80  public function setIcon($icon)
81  {
82  $this->icon = $icon;
83  }
84 
90  public function getIcon()
91  {
92  return $this->icon;
93  }
94 
98  public function getIconWidth()
99  {
100  return $this->iconWidth;
101  }
102 
106  public function setIconWidth($iconWidth)
107  {
108  $this->iconWidth = $iconWidth;
109  }
110 
114  public function getIconHeight()
115  {
116  return $this->iconHeight;
117  }
118 
122  public function setIconHeight($iconHeight)
123  {
124  $this->iconHeight = $iconHeight;
125  }
126 
133  public function setKey($key)
134  {
135  $this->key = $key;
136  }
137 
143  public function getKey()
144  {
145  return $this->key;
146  }
147 
154  public function setTitle($title)
155  {
156  $this->title = $title;
157  }
158 
164  public function getTitle()
165  {
166  return $this->title;
167  }
168 
175  public function setVersion($version)
176  {
177  $this->version = $version;
178  }
179 
188  {
190  }
191 
197  public function getVersion()
198  {
199  return $this->version;
200  }
201 
209  {
210  $this->updateResult = (array)$updateResult;
211  }
212 
218  public function getUpdateResult()
219  {
220  return $this->updateResult;
221  }
222 
228  public function toArray()
229  {
230  return [
231  'key' => $this->getKey(),
232  'title' => $this->getTitle(),
233  'icon' => $this->getIcon(),
234  'version' => $this->getVersion(),
235  'width' => $this->getIconWidth(),
236  'height' => $this->getIconHeight()
237  ];
238  }
239 }