‪TYPO3CMS  10.4
SlotReplacement.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 
19 
20 use ‪TYPO3\CMS\Extbase\SignalSlot\Dispatcher as SignalSlotDispatcher;
26 
35 {
39  protected ‪$signalSlotDispatcher;
40 
41  public function ‪__construct(SignalSlotDispatcher ‪$signalSlotDispatcher)
42  {
43  $this->signalSlotDispatcher = ‪$signalSlotDispatcher;
44  }
45 
47  {
48  [$obj, $dataArray, $versions] = $this->signalSlotDispatcher->dispatch(
49  GridDataService::class,
51  [$event->‪getGridService(), $event->‪getData(), $event->‪getVersions()]
52  );
53  $event->‪setData($dataArray);
54  $event->‪setVersions($versions);
55  }
56 
58  {
59  [$obj, $dataArray] = $this->signalSlotDispatcher->dispatch(
60  GridDataService::class,
62  [$event->‪getGridService(), $event->‪getData(), $event->‪getVersions()]
63  );
64  $event->‪setData($dataArray);
65  }
66 
67  public function ‪onGetDataPostProcessing(‪GetVersionedDataEvent $event): void
68  {
69  [$obj, $dataArray, $start, $limit, $dataArrayPart] = $this->signalSlotDispatcher->dispatch(
70  GridDataService::class,
72  [$event->‪getGridService(), $event->‪getData(), $event->‪getStart(), $event->‪getLimit(), $event->‪getDataArrayPart()]
73  );
74  $event->‪setData($dataArray);
75  $event->‪setDataArrayPart($dataArrayPart);
76  }
77 
78  public function ‪onSortDataPostProcessing(‪SortVersionedDataEvent $event): void
79  {
80  [$obj, $dataArray, $sortingColumn, $sortingDirection] = $this->signalSlotDispatcher->dispatch(
81  GridDataService::class,
83  [$event->‪getGridService(), $event->‪getData(), $event->‪getSortColumn(), $event->‪getSortDirection()]
84  );
85  $event->‪setData($dataArray);
86  $event->‪setSortColumn($sortingColumn);
87  $event->‪setSortDirection($sortingDirection);
88  }
89 }
‪TYPO3\CMS\Workspaces\Event\GetVersionedDataEvent\getGridService
‪getGridService()
Definition: GetVersionedDataEvent.php:58
‪TYPO3\CMS\Workspaces\Event\AfterCompiledCacheableDataForWorkspaceEvent\getGridService
‪getGridService()
Definition: AfterCompiledCacheableDataForWorkspaceEvent.php:46
‪TYPO3\CMS\Workspaces\Event\SortVersionedDataEvent
Definition: SortVersionedDataEvent.php:26
‪TYPO3\CMS\Workspaces\Event\AfterCompiledCacheableDataForWorkspaceEvent\setData
‪setData(array $data)
Definition: AfterCompiledCacheableDataForWorkspaceEvent.php:56
‪TYPO3\CMS\Workspaces\Event\AfterDataGeneratedForWorkspaceEvent
Definition: AfterDataGeneratedForWorkspaceEvent.php:26
‪TYPO3\CMS\Workspaces\Event\SortVersionedDataEvent\setData
‪setData(array $data)
Definition: SortVersionedDataEvent.php:61
‪TYPO3\CMS\Workspaces\Event\GetVersionedDataEvent\getData
‪getData()
Definition: GetVersionedDataEvent.php:63
‪TYPO3\CMS\Workspaces\Compatibility
Definition: SlotReplacement.php:18
‪TYPO3\CMS\Workspaces\Event\SortVersionedDataEvent\getGridService
‪getGridService()
Definition: SortVersionedDataEvent.php:51
‪TYPO3\CMS\Workspaces\Event\SortVersionedDataEvent\getSortColumn
‪getSortColumn()
Definition: SortVersionedDataEvent.php:66
‪TYPO3\CMS\Workspaces\Compatibility\SlotReplacement\onGenerateDataArrayPostProcessing
‪onGenerateDataArrayPostProcessing(AfterDataGeneratedForWorkspaceEvent $event)
Definition: SlotReplacement.php:56
‪TYPO3\CMS\Workspaces\Event\AfterCompiledCacheableDataForWorkspaceEvent\setVersions
‪setVersions(array $versions)
Definition: AfterCompiledCacheableDataForWorkspaceEvent.php:66
‪TYPO3\CMS\Workspaces\Event\GetVersionedDataEvent\setData
‪setData(array $data)
Definition: GetVersionedDataEvent.php:68
‪TYPO3\CMS\Workspaces\Compatibility\SlotReplacement
Definition: SlotReplacement.php:35
‪TYPO3\CMS\Workspaces\Event\GetVersionedDataEvent\getDataArrayPart
‪getDataArrayPart()
Definition: GetVersionedDataEvent.php:73
‪TYPO3\CMS\Workspaces\Event\SortVersionedDataEvent\getData
‪getData()
Definition: SortVersionedDataEvent.php:56
‪TYPO3\CMS\Workspaces\Event\GetVersionedDataEvent\getStart
‪getStart()
Definition: GetVersionedDataEvent.php:83
‪TYPO3\CMS\Workspaces\Event\SortVersionedDataEvent\setSortDirection
‪setSortDirection(string $sortDirection)
Definition: SortVersionedDataEvent.php:81
‪TYPO3\CMS\Workspaces\Compatibility\SlotReplacement\__construct
‪__construct(SignalSlotDispatcher $signalSlotDispatcher)
Definition: SlotReplacement.php:40
‪TYPO3\CMS\Workspaces\Service\GridDataService\SIGNAL_GetDataArray_PostProcesss
‪const SIGNAL_GetDataArray_PostProcesss
Definition: GridDataService.php:56
‪TYPO3\CMS\Workspaces\Compatibility\SlotReplacement\onGenerateDataArrayBeforeCaching
‪onGenerateDataArrayBeforeCaching(AfterCompiledCacheableDataForWorkspaceEvent $event)
Definition: SlotReplacement.php:45
‪TYPO3\CMS\Workspaces\Service\GridDataService\SIGNAL_GenerateDataArray_PostProcesss
‪const SIGNAL_GenerateDataArray_PostProcesss
Definition: GridDataService.php:52
‪TYPO3\CMS\Workspaces\Compatibility\SlotReplacement\$signalSlotDispatcher
‪SignalSlotDispatcher $signalSlotDispatcher
Definition: SlotReplacement.php:38
‪TYPO3\CMS\Workspaces\Event\AfterDataGeneratedForWorkspaceEvent\getVersions
‪getVersions()
Definition: AfterDataGeneratedForWorkspaceEvent.php:61
‪TYPO3\CMS\Workspaces\Event\AfterDataGeneratedForWorkspaceEvent\getData
‪getData()
Definition: AfterDataGeneratedForWorkspaceEvent.php:51
‪TYPO3\CMS\Workspaces\Event\GetVersionedDataEvent\getLimit
‪getLimit()
Definition: GetVersionedDataEvent.php:88
‪TYPO3\CMS\Workspaces\Event\AfterCompiledCacheableDataForWorkspaceEvent
Definition: AfterCompiledCacheableDataForWorkspaceEvent.php:26
‪TYPO3\CMS\Workspaces\Event\AfterDataGeneratedForWorkspaceEvent\setData
‪setData(array $data)
Definition: AfterDataGeneratedForWorkspaceEvent.php:56
‪TYPO3\CMS\Workspaces\Event\SortVersionedDataEvent\getSortDirection
‪getSortDirection()
Definition: SortVersionedDataEvent.php:76
‪TYPO3\CMS\Workspaces\Compatibility\SlotReplacement\onGetDataPostProcessing
‪onGetDataPostProcessing(GetVersionedDataEvent $event)
Definition: SlotReplacement.php:66
‪TYPO3\CMS\Workspaces\Event\AfterDataGeneratedForWorkspaceEvent\getGridService
‪getGridService()
Definition: AfterDataGeneratedForWorkspaceEvent.php:46
‪TYPO3\CMS\Workspaces\Event\AfterCompiledCacheableDataForWorkspaceEvent\getData
‪getData()
Definition: AfterCompiledCacheableDataForWorkspaceEvent.php:51
‪TYPO3\CMS\Workspaces\Event\AfterCompiledCacheableDataForWorkspaceEvent\getVersions
‪getVersions()
Definition: AfterCompiledCacheableDataForWorkspaceEvent.php:61
‪TYPO3\CMS\Workspaces\Event\GetVersionedDataEvent
Definition: GetVersionedDataEvent.php:28
‪TYPO3\CMS\Workspaces\Service\GridDataService\SIGNAL_SortDataArray_PostProcesss
‪const SIGNAL_SortDataArray_PostProcesss
Definition: GridDataService.php:60
‪TYPO3\CMS\Workspaces\Service\GridDataService\SIGNAL_GenerateDataArray_BeforeCaching
‪const SIGNAL_GenerateDataArray_BeforeCaching
Definition: GridDataService.php:48
‪TYPO3\CMS\Workspaces\Compatibility\SlotReplacement\onSortDataPostProcessing
‪onSortDataPostProcessing(SortVersionedDataEvent $event)
Definition: SlotReplacement.php:77
‪TYPO3\CMS\Workspaces\Event\GetVersionedDataEvent\setDataArrayPart
‪setDataArrayPart(array $dataArrayPart)
Definition: GetVersionedDataEvent.php:78
‪TYPO3\CMS\Workspaces\Service\GridDataService
Definition: GridDataService.php:42
‪TYPO3\CMS\Workspaces\Event\SortVersionedDataEvent\setSortColumn
‪setSortColumn(string $sortColumn)
Definition: SortVersionedDataEvent.php:71
‪TYPO3\CMS\Extbase\SignalSlot\Dispatcher
Definition: Dispatcher.php:126