[!!!][TASK] Do not handle 'uploadsfolder' in ext_emconf anymore
[Packages/TYPO3.CMS.git] / typo3 / sysext / t3editor / Classes / Addon.php
1 <?php
2 declare(strict_types = 1);
3 namespace TYPO3\CMS\T3editor;
4
5 /*
6 * This file is part of the TYPO3 CMS project.
7 *
8 * It is free software; you can redistribute it and/or modify it under
9 * the terms of the GNU General Public License, either version 2
10 * of the License, or any later version.
11 *
12 * For the full copyright and license information, please read the
13 * LICENSE.txt file that was distributed with this source code.
14 *
15 * The TYPO3 project - inspiring people to share!
16 */
17
18 /**
19 * Represents an addon for CodeMirror
20 * @internal
21 */
22 class Addon
23 {
24 /**
25 * @var string
26 */
27 protected $identifier = '';
28
29 /**
30 * @var array
31 */
32 protected $modes = [];
33
34 /**
35 * @var array
36 */
37 protected $options = [];
38
39 /**
40 * @var array
41 */
42 protected $cssFiles = [];
43
44 /**
45 * @param string $identifier
46 */
47 public function __construct(string $identifier)
48 {
49 $this->identifier = $identifier;
50 }
51
52 /**
53 * @return string
54 */
55 public function getIdentifier(): string
56 {
57 return $this->identifier;
58 }
59
60 /**
61 * @param array $modes
62 * @return self
63 */
64 public function setModes(array $modes): Addon
65 {
66 $this->modes = $modes;
67
68 return $this;
69 }
70
71 /**
72 * @return array
73 */
74 public function getModes(): array
75 {
76 return $this->modes;
77 }
78
79 /**
80 * @param array $options
81 * @return self
82 */
83 public function setOptions(array $options): Addon
84 {
85 $this->options = $options;
86
87 return $this;
88 }
89
90 /**
91 * @return array
92 */
93 public function getOptions(): array
94 {
95 return $this->options;
96 }
97
98 /**
99 * @param array $cssFiles
100 * @return self
101 */
102 public function setCssFiles(array $cssFiles): Addon
103 {
104 $this->cssFiles = $cssFiles;
105
106 return $this;
107 }
108
109 /**
110 * @return array
111 */
112 public function getCssFiles(): array
113 {
114 return $this->cssFiles;
115 }
116 }