‪TYPO3CMS  9.5
Mode.php
Go to the documentation of this file.
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 
22 class ‪Mode
23 {
27  protected ‪$identifier = '';
28 
32  protected ‪$formatCode = '';
33 
37  protected ‪$fileExtensions = [];
38 
42  protected ‪$isDefault = false;
43 
47  public function ‪__construct(string ‪$identifier)
48  {
49  $this->identifier = ‪$identifier;
50  }
51 
55  public function ‪getIdentifier(): string
56  {
57  return ‪$this->identifier;
58  }
59 
63  public function ‪getFormatCode(): string
64  {
65  return ‪$this->formatCode;
66  }
67 
72  public function ‪setFormatCode(string ‪$formatCode): ‪Mode
73  {
74  $this->formatCode = ‪$formatCode;
75 
76  return $this;
77  }
78 
83  public function ‪bindToFileExtensions(array ‪$fileExtensions): Mode
84  {
85  $this->fileExtensions = ‪$fileExtensions;
86 
87  return $this;
88  }
89 
93  public function ‪getBoundFileExtensions(): array
94  {
96  }
97 
101  public function ‪setAsDefault(): ‪Mode
102  {
103  $this->‪isDefault = true;
104 
105  return $this;
106  }
107 
111  public function ‪isDefault(): bool
112  {
113  return ‪$this->isDefault;
114  }
115 }
‪TYPO3\CMS\T3editor
Definition: Addon.php:3
‪TYPO3\CMS\T3editor\Mode\$fileExtensions
‪array $fileExtensions
Definition: Mode.php:34
‪TYPO3\CMS\T3editor\Mode\setAsDefault
‪Mode setAsDefault()
Definition: Mode.php:97
‪TYPO3\CMS\T3editor\Mode\$identifier
‪string $identifier
Definition: Mode.php:26
‪TYPO3\CMS\T3editor\Mode\$isDefault
‪bool $isDefault
Definition: Mode.php:38
‪TYPO3\CMS\T3editor\Mode\getBoundFileExtensions
‪array getBoundFileExtensions()
Definition: Mode.php:89
‪TYPO3\CMS\T3editor\Mode\$formatCode
‪string $formatCode
Definition: Mode.php:30
‪TYPO3\CMS\T3editor\Mode\isDefault
‪bool isDefault()
Definition: Mode.php:107
‪TYPO3\CMS\T3editor\Mode\getFormatCode
‪string getFormatCode()
Definition: Mode.php:59
‪TYPO3\CMS\T3editor\Mode
Definition: Mode.php:23
‪TYPO3\CMS\T3editor\Mode\setFormatCode
‪Mode setFormatCode(string $formatCode)
Definition: Mode.php:68
‪TYPO3\CMS\T3editor\Mode\__construct
‪__construct(string $identifier)
Definition: Mode.php:43
‪TYPO3\CMS\T3editor\Mode\bindToFileExtensions
‪self bindToFileExtensions(array $fileExtensions)
Definition: Mode.php:79
‪TYPO3\CMS\T3editor\Mode\getIdentifier
‪string getIdentifier()
Definition: Mode.php:51