[TYPO3-core] RFC #8890: Feature: hook in function "getSingleField_SW" before rendering of single fields in tceforms.
alex widschwendter
a.widschwendter at mediares.at
Thu Jul 3 11:21:02 CEST 2008
This is an SVN patch request.
Type: New feature
Bugtracker references:
http://bugs.typo3.org/view.php?id=8890
Branches:
TYPO3_4-2 and trunk
Problem:
existing hooks do not allow manipulation of the $PA array
Solution:
the hook can be used to add addtional config options in the tca array,
to in influence the rendering of the field.
Notes:
i used it to render some fields "readOnly" based on logged in be_user. ex:
function getSingleField_beforeRender($table,$field,$row,&$PA) {
if (is_array($PA['fieldConf']['config']['readOnlyGroups'])) {
if
(count(array_intersect($PA['fieldConf']['config']['readOnlyGroups'],
$GLOBALS['BE_USER']->userGroupsUID))>0) {
$PA['fieldConf']['config']['readOnly'] = true;
}
}
}
TIA alex
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bug_0008890.diff
Url: http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20080703/f43fdc60/attachment.txt
More information about the TYPO3-team-core
mailing list