‪TYPO3CMS  10.4
Mode.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
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 namespace ‪TYPO3\CMS\T3editor;
19 
24 class ‪Mode
25 {
29  protected ‪$identifier = '';
30 
34  protected ‪$formatCode = '';
35 
39  protected ‪$fileExtensions = [];
40 
44  protected ‪$isDefault = false;
45 
49  public function ‪__construct(string ‪$identifier)
50  {
51  $this->identifier = ‪$identifier;
52  }
53 
57  public function ‪getIdentifier(): string
58  {
59  return ‪$this->identifier;
60  }
61 
65  public function ‪getFormatCode(): string
66  {
67  return ‪$this->formatCode;
68  }
69 
74  public function ‪setFormatCode(string ‪$formatCode): ‪Mode
75  {
76  $this->formatCode = ‪$formatCode;
77 
78  return $this;
79  }
80 
85  public function ‪bindToFileExtensions(array ‪$fileExtensions): Mode
86  {
87  $this->fileExtensions = ‪$fileExtensions;
88 
89  return $this;
90  }
91 
95  public function ‪getBoundFileExtensions(): array
96  {
98  }
99 
103  public function ‪setAsDefault(): ‪Mode
104  {
105  $this->‪isDefault = true;
106 
107  return $this;
108  }
109 
113  public function ‪isDefault(): bool
114  {
115  return ‪$this->isDefault;
116  }
117 }
‪TYPO3\CMS\T3editor
Definition: Addon.php:18
‪TYPO3\CMS\T3editor\Mode\$fileExtensions
‪array $fileExtensions
Definition: Mode.php:36
‪TYPO3\CMS\T3editor\Mode\setAsDefault
‪Mode setAsDefault()
Definition: Mode.php:99
‪TYPO3\CMS\T3editor\Mode\$identifier
‪string $identifier
Definition: Mode.php:28
‪TYPO3\CMS\T3editor\Mode\$isDefault
‪bool $isDefault
Definition: Mode.php:40
‪TYPO3\CMS\T3editor\Mode\getBoundFileExtensions
‪array getBoundFileExtensions()
Definition: Mode.php:91
‪TYPO3\CMS\T3editor\Mode\$formatCode
‪string $formatCode
Definition: Mode.php:32
‪TYPO3\CMS\T3editor\Mode\isDefault
‪bool isDefault()
Definition: Mode.php:109
‪TYPO3\CMS\T3editor\Mode\getFormatCode
‪string getFormatCode()
Definition: Mode.php:61
‪TYPO3\CMS\T3editor\Mode
Definition: Mode.php:25
‪TYPO3\CMS\T3editor\Mode\setFormatCode
‪Mode setFormatCode(string $formatCode)
Definition: Mode.php:70
‪TYPO3\CMS\T3editor\Mode\__construct
‪__construct(string $identifier)
Definition: Mode.php:45
‪TYPO3\CMS\T3editor\Mode\bindToFileExtensions
‪self bindToFileExtensions(array $fileExtensions)
Definition: Mode.php:81
‪TYPO3\CMS\T3editor\Mode\getIdentifier
‪string getIdentifier()
Definition: Mode.php:53