[Frage] tt_content mit external_import synchronisieren TYPO3-Version: 8.7.11

  • sanktusm sanktusm
    T3PO
    0 x
    29 Beiträge
    0 Hilfreiche Beiträge
    02. 08. 2018, 15:44

    Hallo,
    mit diesem Script (nicht vollständig) möchte ich die Tabelle tt_content synchronieren, die ich mit Mask erweitert habe. Wenn ich jedoch $GLOBALS['TCA']['tt_content'] schreibe tritt ein Fehler auf, was nicht verwunderlich ist, da $GLOBALS['TCA']['ex_content'] schon besetzt ist. Ich habe es nun so gelöst, bin mir aber unsicher ob die Syntax korrekt ist. die Datei tca.php habe ich in den Ordner external_import/configuration/TCA gelegt:

    <?php
    $GLOBALS['TCA']['ex_content'] = array(
    'ctrl' => array(
    'title' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tt_content',
    'label' => 'name',
    'tstamp' => 'tstamp',
    'crdate' => 'crdate',
    'cruser_id' => 'cruser_id',
    'default_sortby' => 'ORDER BY name',
    'delete' => 'deleted',
    'enablecolumns' => array(
    'disabled' => 'hidden',
    ),
    'dynamicConfigFile' => $extensionPath . 'tca.php',
    'external' => array(
    0 => array(
    'connector' => 'csv',
    'parameters' => array(
    'filename' => $extensionPath . 'Tests\Unit\Utility\testdata.csv',
    'delimiter' => ",",
    'text_qualifier' => '"',
    'skip_rows' => 1,
    'encoding' => 'utf-8'
    ),
    'data' => 'array',
    'reference_uid' => 'uid',
    'priority' => 10,
    'description' => 'Import of all company departments'
    )
    )
    ),

    'interface' => array(
    'showRecordFieldList' => 'uid,pid'
    ),


    'feInterface' => $GLOBALS['TCA']['ex_content']['feInterface'],

    'columns' => array(

    'uid' => array(
    'exclude' => 0,
    'label' => 'LLL:EXT:external_import/locallang_db.xml:tt_content.uid',
    'config' => array(
    'type' => 'input',
    'size' => '10',
    'max' => '4',
    'eval' => 'required,trim',
    ),
    'external' => array(
    0 => array(

    'field' => 'uid'

    )
    )

    ),
    'pid' => array(
    'exclude' => 0,
    'label' => 'LLL:EXT:external_import/locallang_db.xml:tt_content.pid',
    'config' => array(
    'type' => 'input',
    'size' => '10',
    'max' => '4',
    'eval' => 'required,trim',
    ),
    'external' => array(
    0 => array(

    'field' => 'pid'

    )
    )

    )

    )
    );
    ?>


  • 1
  • pstranghoener pstrangho...
    Die Macht
    0 x
    534 Beiträge
    26 Hilfreiche Beiträge
    28. 08. 2018, 07:42

    Hey sanktusm,
    hast dus rausbekommen? Sonst schau ichs mir nochmal genauer an.

    Grüße
    Philipp

  • 1