Workspaces   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 57
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 57
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getTca() 0 20 1
A getDatabaseSql() 0 15 1
A getDatabaseSqlKey() 0 6 1
1
<?php
2
3
/**
4
 * DataSet information for workspaces.
5
 */
6
declare(strict_types = 1);
7
8
namespace HDNET\Autoloader\DataSet;
9
10
use HDNET\Autoloader\DataSetInterface;
11
12
/**
13
 * DataSet information for workspaces.
14
 */
15
class Workspaces implements DataSetInterface
16
{
17
    /**
18
     * Get TCA information.
19
     */
20
    public function getTca(string $tableName): array
21
    {
22
        return [
23
            'ctrl' => [
24
                'versioningWS' => true,
25
                'shadowColumnsForNewPlaceholders' => 'sys_language_uid',
26
                'origUid' => 't3_origuid',
27
            ],
28
            'columns' => [
29
                't3ver_label' => [
30
                    'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.versionLabel',
31
                    'config' => [
32
                        'type' => 'input',
33
                        'size' => 30,
34
                        'max' => 255,
35
                    ],
36
                ],
37
            ],
38
        ];
39
    }
40
41
    /**
42
     * Get database sql information.
43
     *
44
     * @see http://docs.typo3.org/typo3cms/TCAReference/Reference/Ctrl/Index.html
45
     */
46
    public function getDatabaseSql(string $tableName): array
47
    {
48
        return [
49
            't3ver_oid int(11) DEFAULT \'0\' NOT NULL',
50
            't3ver_id int(11) DEFAULT \'0\' NOT NULL',
51
            't3ver_label varchar(255) DEFAULT \'\' NOT NULL',
52
            't3ver_wsid int(11) DEFAULT \'0\' NOT NULL',
53
            't3ver_state tinyint(4) DEFAULT \'0\' NOT NULL',
54
            't3ver_stage int(11) DEFAULT \'0\' NOT NULL',
55
            't3ver_count int(11) DEFAULT \'0\' NOT NULL',
56
            't3ver_tstamp int(11) DEFAULT \'0\' NOT NULL',
57
            't3ver_move_id int(11) DEFAULT \'0\' NOT NULL',
58
            't3_origuid int(11) DEFAULT \'0\' NOT NULL',
59
        ];
60
    }
61
62
    /**
63
     * Get database sql key information.
64
     */
65
    public function getDatabaseSqlKey(): array
66
    {
67
        return [
68
            'KEY t3ver_oid (t3ver_oid,t3ver_wsid)',
69
        ];
70
    }
71
}
72