Zitat von
zinky
@Nacht89: Du könntest über den Options-Hook eine Liste aller Datenbank-Tabellen zurückgeben. In der Datenbankklasse gibt es dafür die Funktion listTables. Du kannst es dir z.B. im Core-Module ModuleListing abgucken (system/modules/listing/dca/tl_module.php:121)
Vielen Dank!
wenn ich das kopiere oder in mein select feld einfüge kommt folgender fehler:
Code:
Warning: in_array() expects parameter 2 to be array, null given in system/modules/core/library/Contao/System.php on line 160
#0 [internal function]: __error(2, 'in_array() expe...', '/homepages/7/d2...', 160, Array)
#1 system/modules/core/library/Contao/System.php(160): in_array('getInstance', NULL)
#2 system/modules/core/library/Contao/Widget.php(1388): Contao\System::importStatic('tl_module_listi...')
#3 system/modules/core/classes/DataContainer.php(265): Contao\Widget::getAttributesFromDca(Array, 'tabelle2', NULL, 'tabelle2', 'tl_auswertung', Object(Contao\DC_Table))
#4 system/modules/core/drivers/DC_Table.php(1907): Contao\DataContainer->row('{Admin_control}...')
#5 system/modules/core/classes/Backend.php(639): Contao\DC_Table->edit()
#6 system/modules/core/controllers/BackendMain.php(131): Contao\Backend->getBackendModule('auswertung')
#7 contao/main.php(20): Contao\BackendMain->run()
#8 {main}
Fatal error: Class 'tl_module_listing' not found in /homepages/7/d283237047/htdocs/moduledev/system/modules/core/library/Contao/System.php on line 160
Code:
'tabelle' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_auswertung']['tabelle'],
'inputType' => 'select',
'exclude' => true,
'sorting' => true,
'flag' => 1,
'options_callback' => array('tl_module_listing', 'getAllTables'),
'eval' => array(
'submitOnChange'=>true,
'decodeEntities'=>true,
'maxlength'=>128,
'tl_class'=>'clr'
),
Lesezeichen