Nach weiterer Recherche denke ich muss es heißen:
---------------------------------------------------------------------------------------------
$data['tx_testsort_domain_model_person'][5] = [
'sorting' => 1
];
$tce =
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler');
$tce->start($data, []);
$tce->process_datamap();
---------------------------------------------------------------------------------------------
Also statt
FALSCH :$tce->process_cmdmap()
RICHTIG: $tce->process_datamap()
Und im $data-Array 'tx_testsort_domain_model_person' anstatt die mn-Tabelle.
(Da nur die zwei 'normalen' Tabellen (person, gebaeude) in
typo3\sysext\core\Classes\DataHandling\DataHandler.php im Array $orderOfTables
(Zeile 990) verfügbar sind).
Aber es funktioniert trotzdem nicht.
Ich vermute das ich das TCA noch anpassen muss um Zugriff auf das Feld
'sorting' der mn-Tabelle zu bekommen.
Aber ich habe keine Ahnung wie.
Anbei mal das TCA von 'tx_testsorting_domain_model_person':
---------------------------------------------------------------------------------------------
<?php
return [
'ctrl' => [
'title' =>
'LLL:EXT:testsort/Resources/Private/Language/locallang_db.xlf:tx_testsort_domain_model_person',
'label' => 'name',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
'sortby' => 'sorting',
'versioningWS' => true,
'languageField' => 'sys_language_uid',
'transOrigPointerField' => 'l10n_parent',
'transOrigDiffSourceField' => 'l10n_diffsource',
'delete' => 'deleted',
'enablecolumns' => [
'disabled' => 'hidden',
'starttime' => 'starttime',
'endtime' => 'endtime',
],
'searchFields' => 'name,gebaeude',
'iconfile' =>
'EXT:testsort/Resources/Public/Icons/tx_testsort_domain_model_person.gif',
],
'interface' => [
'showRecordFieldList' => 'sys_language_uid, l10n_parent,
l10n_diffsource, hidden, name, gebaeude',
],
'types' => [
'1' => ['showitem' => 'sys_language_uid, l10n_parent,
l10n_diffsource, hidden, name, gebaeude,
--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access,
starttime, endtime'],
],
'columns' => [
'sys_language_uid' => [
'exclude' => true,
'label' =>
'LLL:EXT:lang/locallang_general.xlf:LGL.language',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'special' => 'languages',
'items' => [
[
'LLL:EXT:lang/locallang_general.xlf:LGL.allLanguages',
-1,
'flags-multiple'
]
],
'default' => 0,
],
],
'l10n_parent' => [
'displayCond' => 'FIELD:sys_language_uid:>:0',
'exclude' => true,
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.l18n_parent',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'items' => [
['', 0],
],
'foreign_table' => 'tx_testsort_domain_model_person',
'foreign_table_where' => 'AND
tx_testsort_domain_model_person.pid=###CURRENT_PID### AND
tx_testsort_domain_model_person.sys_language_uid IN (-1,0)',
],
],
'l10n_diffsource' => [
'config' => [
'type' => 'passthrough',
],
],
't3ver_label' => [
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.versionLabel',
'config' => [
'type' => 'input',
'size' => 30,
'max' => 255,
],
],
'hidden' => [
'exclude' => true,
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.hidden',
'config' => [
'type' => 'check',
'items' => [
'1' => [
'0' => 'LLL:EXT:lang/locallang_core.xlf:labels.enabled'
]
],
],
],
'starttime' => [
'exclude' => true,
'l10n_mode' => 'mergeIfNotBlank',
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.starttime',
'config' => [
'type' => 'input',
'size' => 13,
'eval' => 'datetime',
'default' => 0,
]
],
'endtime' => [
'exclude' => true,
'l10n_mode' => 'mergeIfNotBlank',
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.endtime',
'config' => [
'type' => 'input',
'size' => 13,
'eval' => 'datetime',
'default' => 0,
'range' => [
'upper' => mktime(0, 0, 0, 1, 1, 2038)
]
],
],
'name' => [
'exclude' => true,
'label' =>
'LLL:EXT:testsort/Resources/Private/Language/locallang_db.xlf:tx_testsort_domain_model_person.name',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim'
],
],
'gebaeude' => [
'exclude' => true,
'label' =>
'LLL:EXT:testsort/Resources/Private/Language/locallang_db.xlf:tx_testsort_domain_model_person.gebaeude',
'config' => [
'type' => 'select',
'renderType' => 'selectMultipleSideBySide',
'foreign_table' =>
'tx_testsort_domain_model_gebaeude',
'MM' => 'tx_testsort_person_gebaeude_mm',
'size' => 10,
'autoSizeMax' => 30,
'maxitems' => 9999,
'multiple' => 0,
'wizards' => [
'_PADDING' => 1,
'_VERTICAL' => 1,
'edit' => [
'module' => [
'name' => 'wizard_edit',
],
'type' => 'popup',
'title' => 'Edit', // todo define label:
LLL:EXT:.../Resources/Private/Language/locallang_tca.xlf:wizard.edit
'icon' =>
'EXT:backend/Resources/Public/Images/FormFieldWizard/wizard_edit.gif',
'popup_onlyOpenIfSelected' => 1,
'JSopenParams' =>
'height=350,width=580,status=0,menubar=0,scrollbars=1',
],
'add' => [
'module' => [
'name' => 'wizard_add',
],
'type' => 'script',
'title' => 'Create new', // todo define
label: LLL:EXT:.../Resources/Private/Language/locallang_tca.xlf:wizard.add
'icon' =>
'EXT:backend/Resources/Public/Images/FormFieldWizard/wizard_add.gif',
'params' => [
'table' =>
'tx_testsort_domain_model_gebaeude',
'pid' => '###CURRENT_PID###',
'setValue' => 'prepend'
],
],
],
],
],
],
];
--------------------------------------------------------------------------------------------------------------------------------------------------------------
Mit
-------------------------------------------------------------------------
//$data['tx_testsort_domain_model_person'][5] = [
// 'name' => 'Bla',
//];
--------------------------------------------------------------------------
kann ich zb. die Property 'name' des Datensatzes erfolgreich setzen.
Aber das Feld 'sorting' kann ich bisher nicht verändern.
Ich hoffe ihr könnt helfen.
_______________________________________________
TYPO3-german mailing list
TYPO3-german@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-german