Skip to content
Snippets Groups Projects
Commit 4afd0c2a authored by Garvin Hicking's avatar Garvin Hicking Committed by Benni Mack
Browse files

[FEATURE] Add record list download presets

The modal to download selected data from a record listing
(Web > List) is enhanced to display a list of configured
presets.

These presets can be defined via page TSconfig or user
TSconfig. The listed columns take personal "exclude
fields" into consideration.

A preset definition looks like:

```
mod.web_list.downloadPresets {
    pages {
        10 {
            label = Test-Preset-1
            columns = uid, title, crdate, slug
        }

        20 {
            label = LLL:EXT:myext/Resources/Private/Language/locallang.xlf:preset2.label
            columns = uid, title, slug
            identifier = some-identifier
        }
    }
}
```

Multiple presets for one table can exist, and as many
presets for as many tables as needed are possible.

Extensions can provide such preset definitions in their
`Configuration/page.tsconfig` file, or in Site Sets.

A new PSR-14 event `BeforeRecordDownloadPresetsAreDisplayedEvent`
allows to modify the list of presets as well.

A new PSR-14 event `BeforeRecordDownloadIsExecutedEvent` allows
to modify the actual download data, replacing the old
hook usage of $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']
['TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList']
['customizeCsvHeader'] and $GLOBALS['TYPO3_CONF_VARS']
['SC_OPTIONS']['TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList']
['customizeCsvRow'].

These hooks have been deprecated and are scheduled for
removal with TYPO3 v14; the only public TYPO3
extension currently utilizing this hook is gridelements.

Resolves: #102337
Releases: main
Change-Id: I001e43874c082c99ded5c6dd8d0f6c3b9e020393
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/83713


Tested-by: default avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: default avatarGarvin Hicking <gh@faktor-e.de>
Tested-by: default avatarcore-ci <typo3@b13.com>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarOliver Bartsch <bo@cedev.de>
Tested-by: default avatarGarvin Hicking <gh@faktor-e.de>
Tested-by: default avatarBenni Mack <benni@typo3.org>
parent c2b33596
Branches
Tags
No related merge requests found
Showing
with 1418 additions and 6 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment