‪TYPO3CMS  ‪main
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 
21 
26 class ‪Mode
27 {
29 
33  protected ‪$formatCode = '';
34 
38  protected ‪$fileExtensions = [];
39 
43  protected ‪$isDefault = false;
44 
46  {
47  $this->module = ‪$module;
48  }
49 
51  {
53  }
54 
55  public function ‪getFormatCode(): string
56  {
58  }
59 
60  public function ‪setFormatCode(string ‪$formatCode): ‪Mode
61  {
62  $this->formatCode = ‪$formatCode;
63 
64  return $this;
65  }
66 
67  public function ‪bindToFileExtensions(array ‪$fileExtensions): ‪Mode
68  {
69  $this->fileExtensions = ‪$fileExtensions;
70 
71  return $this;
72  }
73 
74  public function ‪getBoundFileExtensions(): array
75  {
77  }
78 
79  public function ‪setAsDefault(): ‪Mode
80  {
81  $this->‪isDefault = true;
82 
83  return $this;
84  }
85 
86  public function ‪isDefault(): bool
87  {
88  return ‪$this->isDefault;
89  }
90 }
‪TYPO3\CMS\T3editor\Mode\__construct
‪__construct(JavaScriptModuleInstruction $module)
Definition: Mode.php:42
‪TYPO3\CMS\T3editor
Definition: Addon.php:18
‪TYPO3\CMS\T3editor\Mode\isDefault
‪isDefault()
Definition: Mode.php:83
‪TYPO3\CMS\T3editor\Mode\$fileExtensions
‪array $fileExtensions
Definition: Mode.php:36
‪TYPO3\CMS\Core\Page\JavaScriptModuleInstruction
Definition: JavaScriptModuleInstruction.php:23
‪TYPO3\CMS\T3editor\Mode\setAsDefault
‪setAsDefault()
Definition: Mode.php:76
‪TYPO3\CMS\T3editor\Mode\$isDefault
‪bool $isDefault
Definition: Mode.php:40
‪TYPO3\CMS\T3editor\Mode\getModule
‪getModule()
Definition: Mode.php:47
‪TYPO3\CMS\T3editor\Mode\$module
‪JavaScriptModuleInstruction $module
Definition: Mode.php:28
‪TYPO3\CMS\T3editor\Mode\$formatCode
‪string $formatCode
Definition: Mode.php:32
‪TYPO3\CMS\T3editor\Mode
Definition: Mode.php:27
‪TYPO3\CMS\T3editor\Mode\bindToFileExtensions
‪bindToFileExtensions(array $fileExtensions)
Definition: Mode.php:64
‪TYPO3\CMS\T3editor\Mode\getBoundFileExtensions
‪getBoundFileExtensions()
Definition: Mode.php:71
‪TYPO3\CMS\T3editor\Mode\getFormatCode
‪getFormatCode()
Definition: Mode.php:52
‪TYPO3\CMS\T3editor\Mode\setFormatCode
‪setFormatCode(string $formatCode)
Definition: Mode.php:57