‪TYPO3CMS  9.5
SubModuleFixture.php
Go to the documentation of this file.
1 <?php
2 declare(strict_types = 1);
3 
5 
6 /*
7  * This file is part of the TYPO3 CMS project.
8  *
9  * It is free software; you can redistribute it and/or modify it under
10  * the terms of the GNU General Public License, either version 2
11  * of the License, or any later version.
12  *
13  * For the full copyright and license information, please read the
14  * LICENSE.txt file that was distributed with this source code.
15  *
16  * The TYPO3 project - inspiring people to share!
17  */
18 
19 use Psr\Http\Message\ServerRequestInterface;
27 use TYPO3\CMS\Adminpanel\Modules\AdminPanelSubModuleInterface;
28 
30 {
31 
37  public function ‪initializeModule(ServerRequestInterface $request): void
38  {
39  }
40 
47  public function ‪getIdentifier(): string
48  {
49  return 'example-submodule';
50  }
51 
57  public function ‪getLabel(): string
58  {
59  return 'Example SubModule';
60  }
61 
68  public function ‪getContent(‪ModuleData $data): string
69  {
70  return 'content';
71  }
72 
78  public function ‪getSettings(): string
79  {
80  return 'settings';
81  }
82 
91  public function ‪onSubmit(array $configurationToSave, ServerRequestInterface $request): void
92  {
93  }
94 
99  public function ‪getDataToStore(ServerRequestInterface $request): ‪ModuleData
100  {
101  return new ‪ModuleData(['foo' => 'bar']);
102  }
103 }
‪TYPO3\CMS\Adminpanel\Tests\Unit\Fixtures\SubModuleFixture\getLabel
‪string getLabel()
Definition: SubModuleFixture.php:57
‪TYPO3\CMS\Adminpanel\ModuleApi\InitializableInterface
Definition: InitializableInterface.php:34
‪TYPO3\CMS\Adminpanel\Tests\Unit\Fixtures\SubModuleFixture\getSettings
‪string getSettings()
Definition: SubModuleFixture.php:78
‪TYPO3\CMS\Adminpanel\ModuleApi\DataProviderInterface
Definition: DataProviderInterface.php:29
‪TYPO3\CMS\Adminpanel\Tests\Unit\Fixtures\SubModuleFixture\initializeModule
‪initializeModule(ServerRequestInterface $request)
Definition: SubModuleFixture.php:37
‪TYPO3\CMS\Adminpanel\ModuleApi\ModuleSettingsProviderInterface
Definition: ModuleSettingsProviderInterface.php:33
‪TYPO3\CMS\Adminpanel\Tests\Unit\Fixtures\SubModuleFixture\onSubmit
‪onSubmit(array $configurationToSave, ServerRequestInterface $request)
Definition: SubModuleFixture.php:91
‪TYPO3\CMS\Adminpanel\ModuleApi\ModuleInterface
Definition: ModuleInterface.php:25
‪TYPO3\CMS\Adminpanel\ModuleApi\ContentProviderInterface
Definition: ContentProviderInterface.php:29
‪TYPO3\CMS\Adminpanel\Tests\Unit\Fixtures\SubModuleFixture\getIdentifier
‪string getIdentifier()
Definition: SubModuleFixture.php:47
‪TYPO3\CMS\Adminpanel\Tests\Unit\Fixtures\SubModuleFixture\getDataToStore
‪TYPO3 CMS Adminpanel ModuleApi ModuleData getDataToStore(ServerRequestInterface $request)
Definition: SubModuleFixture.php:99
‪TYPO3\CMS\Adminpanel\ModuleApi\OnSubmitActorInterface
Definition: OnSubmitActorInterface.php:25
‪TYPO3\CMS\Adminpanel\ModuleApi\ModuleData
Definition: ModuleData.php:26
‪TYPO3\CMS\Adminpanel\Tests\Unit\Fixtures
Definition: DisabledMainModuleFixture.php:4
‪TYPO3\CMS\Adminpanel\Tests\Unit\Fixtures\SubModuleFixture\getContent
‪string getContent(ModuleData $data)
Definition: SubModuleFixture.php:68
‪TYPO3\CMS\Adminpanel\Tests\Unit\Fixtures\SubModuleFixture
Definition: SubModuleFixture.php:30