tt_content.php 2.15 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<?php
/**
 * Created by PhpStorm.
 * User: bbaer
 * Date: 5/3/19
 * Time: 6:33 PM
 */

/*
 * The type name is generated by combining the extension key and plugin name, all lowercase and concatenated with `_'
 */

if (!defined('TYPO3_MODE')) {
    die ('Access denied.');
}

Carsten  Rose's avatar
Carsten Rose committed
17
if (is_array($GLOBALS['TCA']['tt_content']['palettes'])) {
18
19
20
21
22
23
24
    $GLOBALS['TCA']['tt_content']['palettes']['introheader']['showitem'] = 'header, CType';
    $GLOBALS['TCA']['tt_content']['palettes']['startendtime']['showitem'] = 'starttime, endtime';
    $GLOBALS['TCA']['tt_content']['palettes']['layoutpalette1']['showitem'] = 'colPos, header_position, sys_language_uid';
    $GLOBALS['TCA']['tt_content']['palettes']['layoutpalette2']['showitem'] = 'layout, header_layout';
    $GLOBALS['TCA']['tt_content']['palettes']['spacearound']['showitem'] = 'spaceBefore, spaceAfter';
}

Carsten  Rose's avatar
Carsten Rose committed
25
if (is_array($GLOBALS['TCA']['tt_content']['types'])) {
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
    $GLOBALS['TCA']['tt_content']['types']['qfq_qfq'] = array(
        'showitem' => '
        --div--;General,
          --palette--;;introheader,
          custom,
          bodytext;Code:;;nowrap,
        --div--;Access,
          hidden, fe_group, deleted, --palette--;;startendtime,
        --div--;Appearance,
          --palette--;;layoutpalette1,
          --palette--;;layoutpalette2,
          --palette--;;spacearound,
          linkToTop, section_frame, sectionIndex',
        'columnsOverrides' => [
            'bodytext' => [
                'config' => [
                    'renderType' => 't3editor',
                    'format' => 'sql',
                    'rows' => 100
                ],
                'constants' => [
                    'renderType' => 't3editor',
                    'format' => 'sql',
                ]
            ]
        ]
    );
Carsten  Rose's avatar
Carsten Rose committed
53
54
55
56
57
58
59
60
61
    $version = \TYPO3\CMS\Core\Utility\VersionNumberUtility::getNumericTypo3Version();
    $versionNr = explode('.', $version);
    if ($versionNr[0] < 9) {

        $GLOBALS['TCA']['tt_content']['types']['qfq_qfq']['columnsOverrides']['bodytext']['config']['format'] = 'sparql';
        $GLOBALS['TCA']['tt_content']['types']['qfq_qfq']['columnsOverrides']['bodytext']['constants']['format'] = 'sparql';
    }
}

bbaer's avatar
bbaer committed
62