Hallo Experten,
ich habe mit Flexform eine dynamische Selectbox gebaut. Inhalt der Selectbox sind die Gruppen aus fe_groups. Das funktioniert wunderbar nur brauche ich jetzt eine zusätzliche where-Bedingung in der Abfrage zum Füllen der Selectorbox. Momentan werden alle Gruppen aus fe_groups gelesen. Ich möchte aber nur die Gruppen die im Systemordner gespeichert sind, der als "Allgemeine Datensatzsammlung" auf der Seite meines Plugins definiert wird. Wie komme ich in der Funktion zum Füllen der dyn. Selectorbox an die ID des Systemordner?
Flexform:
<dynfield>
<tceforms>
<label>Profilkategorie</label>
<config>
<itemsprocfunc>tx_sytextuserprofiles_addFieldsToFlexForm->addFields</itemsprocfunc>
<type>select</type>
</config>
</tceforms>
</dynfield>
Funktion zum Füllen der Selectorbox:
<?php
class tx_sytextuserprofiles_addFieldsToFlexForm {
function addFields ($config) {
$optionList = array();
$result = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid,title', 'fe_groups', 'hidden=0 and deleted=0'/* and pid='.$GLOBALS['TSFE']->getStorageSiterootPids()*/, '','','');
$i=0;
while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result))
{
$optionList[$i] = array(0 => $row['title'], 1 => $row['uid']);
$i++;
}
$config['items'] = array_merge($config['items'],$optionList);
return $config;
}
}
?>