Project

General

Profile

Actions

Bug #70560

closed

DataProvider exclusivity issues

Added by Claus Due about 9 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2015-10-10
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

In a nutshell:

Part of the reasoning behind implementing DataProviders over itemsProcFunc was the exclusive nature of itemsProcFunc: define one and any previously defined itemsProcFunc would be removed. This was solved by allowing any number of DataProviders to be registered, but unforunately this has only moved the exclusivity issue to another place. Now, the exclusiveness is in the fact that only a single DataProvider can apply at any time - in the case of backend_layout, based on a user selection. So, where before any itemsProcFunc would overwrite the one before - now, any selected DataProvider will prevent all others from being consulted. Status Quo.

We need to get around this exclusiveness so that any DataProvider may manipulate the items list without necessarily having been selected.

See https://github.com/FluidTYPO3/flux/issues/940 for a thorough background.

Suggested strategy:

1. Extend the DataProvider pattern with one additional method: trigger() which accepts the same $parameters array as the processing function.
2. Implement this method in the base DataProvider and make it return TRUE if the default parameter matches the current expectation (e.g. if name of DataProvider is currently selected as backend_layout).
3. Process items returned by any DataProvider that has returned TRUE from trigger(). Always process all DataProviders.

This will finally losen up the DataProvider pattern enough that they are truly inclusive in nature.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #76509: FormEngine does not allow saving dynamic items and does not preselect dynamic items based on column valueClosed2016-06-07

Actions
Actions

Also available in: Atom PDF