[TASK] Streamline select field value handling 78/43278/12
authorAlexander Stehlik <alexander.stehlik@gmail.com>
Mon, 14 Sep 2015 16:26:56 +0000 (18:26 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Tue, 15 Sep 2015 06:38:01 +0000 (08:38 +0200)
commitd1caf7688bde1c088c797668470c729a4688d3dd
treed0075b96c866cc38b1878e47027abc2e2bf42f03
parentf3dc2348b1cd57720fc42c751ec6636e167ab7c0
[TASK] Streamline select field value handling

The TcaSelectValues form data provider is merged in the
TcaSelectItems provider.

The possible select items are classified in dynamic items that
come from a foreign_table and static items that come from TCA,
PageTS etc.

The value for single item select fields (the default) will not
be processed because the handling of invalid values will currently
be done by the select field element renderer.

If the values from a multi value select field come from statically
defined items (e.g. items directly added in the TCA) the value will
always be added to the list of selected values.

If the values comes from dynamic select items from a database
relation the select values will only be added when they were
validated by the RelationHandler.

Finally the selected values are parsed by array_unique to prevent
duplicate entries.

Resolves: #69742
Relates: #69755
Relates: #69761
Releases: master
Change-Id: I4dca24b26c36ae91dc527edcd900b352f705f5c4
Reviewed-on: http://review.typo3.org/43278
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
Reviewed-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/backend/Classes/Form/FormDataProvider/TcaSelectItems.php
typo3/sysext/backend/Classes/Form/FormDataProvider/TcaSelectValues.php [deleted file]
typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaSelectItemsTest.php
typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaSelectValuesTest.php [deleted file]
typo3/sysext/core/Configuration/DefaultConfiguration.php