User = BackendUser::getInstance(); } /** * @Callback(table="tl_memberfiles_config", target="fields.fields.options") */ public function onFieldsOptionsCallback(?DataContainer $dc) { $return = array('id'=>'ID'); System::loadLanguageFile('tl_member'); Controller::loadDataContainer('tl_member'); foreach ($GLOBALS['TL_DCA']['tl_member']['fields'] as $k=>$v) { if (is_array($v['label'])) { $return[$k] = $GLOBALS['TL_DCA']['tl_member']['fields'][$k]['label'][0]; } } return $return; } /** * @Callback(table="tl_memberfiles_config", target="fields.notification.options") */ public function onNotificationOptionsCallback(?DataContainer $dc) { $arrChoices = array(); $objNotifications = \Database::getInstance()->execute("SELECT id,title FROM tl_nc_notification WHERE type='secDownloads_submitted' ORDER BY title"); while ($objNotifications->next()) { $arrChoices[$objNotifications->id] = $objNotifications->title; } return $arrChoices; } }