TYPO3 CMS  TYPO3_8-7
Extension.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 
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 
79  public function setIcon($icon)
80  {
81  $this->icon = $icon;
82  }
83 
89  public function getIcon()
90  {
91  return $this->icon;
92  }
93 
97  public function getIconWidth()
98  {
99  return $this->iconWidth;
100  }
101 
105  public function setIconWidth($iconWidth)
106  {
107  $this->iconWidth = $iconWidth;
108  }
109 
113  public function getIconHeight()
114  {
115  return $this->iconHeight;
116  }
117 
121  public function setIconHeight($iconHeight)
122  {
123  $this->iconHeight = $iconHeight;
124  }
125 
131  public function setKey($key)
132  {
133  $this->key = $key;
134  }
135 
141  public function getKey()
142  {
143  return $this->key;
144  }
145 
151  public function setTitle($title)
152  {
153  $this->title = $title;
154  }
155 
161  public function getTitle()
162  {
163  return $this->title;
164  }
165 
171  public function setVersion($version)
172  {
173  $this->version = $version;
174  }
175 
183  {
185  }
186 
192  public function getVersion()
193  {
194  return $this->version;
195  }
196 
203  {
204  $this->updateResult = (array)$updateResult;
205  }
206 
212  public function getUpdateResult()
213  {
214  return $this->updateResult;
215  }
216 
222  public function toArray()
223  {
224  return [
225  'key' => $this->getKey(),
226  'title' => $this->getTitle(),
227  'icon' => $this->getIcon(),
228  'version' => $this->getVersion(),
229  'width' => $this->getIconWidth(),
230  'height' => $this->getIconHeight()
231  ];
232  }
233 }
__construct($key='', $title='', $icon='')
Definition: Extension.php:67