TYPO3 CMS  TYPO3_7-6
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 
21 {
25  protected $key = '';
26 
30  protected $title = '';
31 
35  protected $icon = '';
36 
40  protected $iconWidth = 28;
41 
45  protected $iconHeight = 28;
46 
50  protected $version = '';
51 
55  protected $updateResult = [];
56 
64  public function __construct($key = '', $title= '', $icon = '')
65  {
66  $this->setKey($key);
67  $this->setTitle($title);
68  $this->setIcon($icon);
69  }
70 
77  public function setIcon($icon)
78  {
79  $this->icon = $icon;
80  }
81 
87  public function getIcon()
88  {
89  return $this->icon;
90  }
91 
95  public function getIconWidth()
96  {
97  return $this->iconWidth;
98  }
99 
103  public function setIconWidth($iconWidth)
104  {
105  $this->iconWidth = $iconWidth;
106  }
107 
111  public function getIconHeight()
112  {
113  return $this->iconHeight;
114  }
115 
119  public function setIconHeight($iconHeight)
120  {
121  $this->iconHeight = $iconHeight;
122  }
123 
130  public function setKey($key)
131  {
132  $this->key = $key;
133  }
134 
140  public function getKey()
141  {
142  return $this->key;
143  }
144 
151  public function setTitle($title)
152  {
153  $this->title = $title;
154  }
155 
161  public function getTitle()
162  {
163  return $this->title;
164  }
165 
172  public function setVersion($version)
173  {
174  $this->version = $version;
175  }
176 
185  {
187  }
188 
194  public function getVersion()
195  {
196  return $this->version;
197  }
198 
206  {
207  $this->updateResult = (array)$updateResult;
208  }
209 
215  public function getUpdateResult()
216  {
217  return $this->updateResult;
218  }
219 
225  public function toArray()
226  {
227  return [
228  'key' => $this->getKey(),
229  'title' => $this->getTitle(),
230  'icon' => $this->getIcon(),
231  'version' => $this->getVersion(),
232  'width' => $this->getIconWidth(),
233  'height' => $this->getIconHeight()
234  ];
235  }
236 }
__construct($key='', $title='', $icon='')
Definition: Extension.php:64