Skip to content

Commit 314c9d5

Browse files
committed
[TASK] Update Codesnippets
Releases: main
1 parent ce48506 commit 314c9d5

File tree

7 files changed

+13
-11
lines changed

7 files changed

+13
-11
lines changed

Documentation/CodeSnippets/Events/Core/Resource/SanitizeFileNameEvent.rst.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,15 @@
33
44
.. php:class:: SanitizeFileNameEvent
55
6-
This event is fired once an index was just added to the database (= indexed), so it is possible
7-
to modify the file name, and name the files according to naming conventions of a specific project.
6+
This event is fired after a file name has been sanitized and before a file is added to FAL. Listeners can use this
7+
event to modify the file name, and name the file according to naming conventions of a specific project.
88

99
.. php:method:: getFileName()
1010
:returns: `string`
1111

12+
.. php:method:: getOriginalFileName()
13+
:returns: `string`
14+
1215
.. php:method:: setFileName(string $fileName)
1316
1417
:param $fileName: the fileName

Documentation/CodeSnippets/Events/Form/AfterFormIsBuiltEvent.rst.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
44
.. php:class:: AfterFormIsBuiltEvent
55
6-
Listeners to this event will be able to modify the form definition
7-
after a form is created.
6+
Listeners to this Event will be able to modify the form definition after it has been built
87

98
.. php:attr:: form
109
:public:

Documentation/CodeSnippets/FlexForms/Examples/PluginHaikuListRegistration.rst.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* This file is part of the TYPO3 CMS project. [...]
1919
*/
2020
21-
defined('TYPO3') or die();
21+
defined('TYPO3') || die();
2222
2323
$pluginSignature = 'examples_haiku_list';
2424

Documentation/ExtensionArchitecture/HowTo/BackendModule/_ModuleConfiguration/_AdminModuleControllerConstruct.rst.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
:caption: Class T3docs\\Examples\\Controller\\AdminModuleController
66
77
use TYPO3\CMS\Backend\Routing\UriBuilder;
8+
use TYPO3\CMS\Backend\Template\Components\ComponentFactory;
89
use TYPO3\CMS\Backend\Template\ModuleTemplateFactory;
910
use TYPO3\CMS\Core\Imaging\IconFactory;
1011
@@ -14,6 +15,7 @@
1415
private ModuleTemplateFactory $moduleTemplateFactory,
1516
private IconFactory $iconFactory,
1617
private UriBuilder $uriBuilder,
18+
private ComponentFactory $componentFactory,
1719
// ...
1820
) {}
1921
}

Documentation/ExtensionArchitecture/HowTo/BackendModule/_ModuleConfiguration/_AdminModuleControllerDebugAction.rst.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
1111
final readonly class AdminModuleController
1212
{
13-
protected function debugAction(
13+
private function debugAction(
1414
ServerRequestInterface $request,
1515
ModuleTemplate $view,
1616
): ResponseInterface {

Documentation/ExtensionArchitecture/HowTo/BackendModule/_ModuleConfiguration/_AdminModuleControllerHandleRequest.rst.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
}
3434
3535
$moduleTemplate = $this->moduleTemplateFactory->create($request);
36-
$this->setUpDocHeader($request, $moduleTemplate);
36+
$this->setUpDocHeader($moduleTemplate);
3737
3838
$title = $languageService->sL('examples.admin_module.mod:mlang_tabs_tab');
3939
switch ($moduleData->get('function')) {
@@ -48,7 +48,7 @@
4848
$title,
4949
$languageService->sL('examples.admin_module.mod:module.menu.password'),
5050
);
51-
return $this->passwordAction($request, $moduleTemplate);
51+
return $this->passwordAction($moduleTemplate);
5252
default:
5353
$moduleTemplate->setTitle(
5454
$title,

Documentation/ExtensionArchitecture/HowTo/BackendModule/_ModuleConfiguration/_AdminModuleControllerSetUpDocHeader.rst.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,18 @@
44
.. code-block:: php
55
:caption: Class T3docs\\Examples\\Controller\\AdminModuleController
66
7-
use Psr\Http\Message\ServerRequestInterface;
87
use TYPO3\CMS\Backend\Template\Components\ButtonBar;
98
use TYPO3\CMS\Backend\Template\ModuleTemplate;
109
use TYPO3\CMS\Core\Imaging\IconSize;
1110
1211
final readonly class AdminModuleController
1312
{
1413
private function setUpDocHeader(
15-
ServerRequestInterface $request,
1614
ModuleTemplate $view,
1715
): void {
1816
$buttonBar = $view->getDocHeaderComponent()->getButtonBar();
1917
$uriBuilderPath = $this->uriBuilder->buildUriFromRoute('web_list', ['id' => 0]);
20-
$list = $buttonBar->makeLinkButton()
18+
$list = $this->componentFactory->createLinkButton()
2119
->setHref($uriBuilderPath)
2220
->setTitle('A Title')
2321
->setShowLabelText(true)

0 commit comments

Comments
 (0)