[TYPO3-german] create a collection programatically

Pierre N. droomdre at yahoo.de
Tue May 31 16:56:09 CEST 2016


hello folks,

ich versuche seit Stunden eine collection anzulegen:

$collection_array= array("type"=>"static","uid"=>4,"title"=>"test","table_name"=>"sys_file_collection","description"=>"my description");
		
$this->objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');

$fileRepository = $this->objectManager->get('TYPO3\\CMS\\Core\\Resource\\ResourceFactory');
$file = $fileRepository->createCollectionObject($collection_array);

ich bekomme zwar keine Fehlermeldung aber in der DB hat die Tabelle "sys_file_collection" keinen neuen Eintrag. Was mache ich da falsch?

vielen Dank im Voraus.


More information about the TYPO3-german mailing list