[FEATURE] Add maximumRecords evaluation for TCA type 'check' 46/26946/9
authorOliver Hader <oliver@typo3.org>
Mon, 20 Jan 2014 18:09:21 +0000 (19:09 +0100)
committerBenjamin Mack <benni@typo3.org>
Sun, 2 Feb 2014 13:27:21 +0000 (14:27 +0100)
commit7cfcb65d3e2b25522490658a07ea17ebaa45baad
tree214cde637d51c8521e18d2981289fbf8f5d71264
parentd6762dd18e733f1421da6b27b29d4d41627115ed
[FEATURE] Add maximumRecords evaluation for TCA type 'check'

Allow the max items evaluation for checkboxes by setting the
accordant 'eval' property in the field configuration in TCA.

This makes it possible to have only e.g. 5 records that have a
checkbox set system-wide or PID-wide. If an editor
sets a another checkbox in record #6, it gets reverted
until another record was unchecked.

Parameters are "maximumRecordsChecked" and
"maximumRecordsCheckedInPid".

$tcaFieldConf = array(
'type' => 'check',
'eval' => 'maximumRecordsChecked',
'validation' => array(
 'maximumRecordsChecked' => 5
)
);

Change-Id: Ic33571fec15dcc9f83a61e2409256cce7dae8b12
Documentation: #55188
Resolves: #55187
Releases: 6.2
Reviewed-on: https://review.typo3.org/26946
Reviewed-by: Ingo Schmitt
Tested-by: Ingo Schmitt
Reviewed-by: Frans Saris
Tested-by: Frans Saris
typo3/sysext/core/Classes/DataHandling/DataHandler.php