@@ -17,7 +17,7 @@ |
||
17 | 17 | use Fab\Vidi\Domain\Model\Content; |
18 | 18 | use Fab\Vidi\Tests\Functional\AbstractFunctionalTestCase; |
19 | 19 | |
20 | -require_once dirname(dirname(__FILE__)) . '/AbstractFunctionalTestCase.php'; |
|
20 | +require_once dirname(dirname(__FILE__)).'/AbstractFunctionalTestCase.php'; |
|
21 | 21 | |
22 | 22 | /** |
23 | 23 | * Test case for class \Fab\Vidi\Grid\CategoryRenderer. |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | use Fab\Vidi\Module\ModuleLoader; |
17 | 17 | use Fab\Vidi\Tests\Functional\AbstractFunctionalTestCase; |
18 | 18 | |
19 | -require_once dirname(dirname(__FILE__)) . '/AbstractFunctionalTestCase.php'; |
|
19 | +require_once dirname(dirname(__FILE__)).'/AbstractFunctionalTestCase.php'; |
|
20 | 20 | |
21 | 21 | /** |
22 | 22 | * Test case for class \Fab\Vidi\Module\ModuleLoader. |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | * @dataProvider attributeValueProvider |
55 | 55 | */ |
56 | 56 | public function attributeCanBeSet($attribute, $value) { |
57 | - $setter = 'set' . ucfirst($attribute); |
|
57 | + $setter = 'set'.ucfirst($attribute); |
|
58 | 58 | $this->fixture->$setter($value); |
59 | 59 | $this->assertAttributeEquals($value, $attribute, $this->fixture); |
60 | 60 | } |
@@ -4,7 +4,7 @@ |
||
4 | 4 | use Fab\Vidi\Domain\Model\Selection; |
5 | 5 | |
6 | 6 | return [ |
7 | - Selection::class => [ |
|
8 | - 'tableName' => 'tx_vidi_selection', |
|
9 | - ], |
|
7 | + Selection::class => [ |
|
8 | + 'tableName' => 'tx_vidi_selection', |
|
9 | + ], |
|
10 | 10 | ]; |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | |
4 | 4 | use Fab\Vidi\Domain\Model\Selection; |
5 | 5 |
@@ -5,7 +5,7 @@ |
||
5 | 5 | * example: bin/typo3 vidi:analyseRelations |
6 | 6 | */ |
7 | 7 | return [ |
8 | - 'vidi:analyseRelations' => [ |
|
9 | - 'class' => VidiCommandController::class |
|
10 | - ], |
|
8 | + 'vidi:analyseRelations' => [ |
|
9 | + 'class' => VidiCommandController::class |
|
10 | + ], |
|
11 | 11 | ]; |
@@ -5,8 +5,8 @@ discard block |
||
5 | 5 | if (!defined('TYPO3')) die ('Access denied.'); |
6 | 6 | |
7 | 7 | $tca = [ |
8 | - 'grid' => [ |
|
9 | - 'excluded_fields' => 'image, imagewidth, imageorient, imagecols, imageborder, image_noRows, image_effects, image_compression, tx_impexp_origuid, image_zoom, |
|
8 | + 'grid' => [ |
|
9 | + 'excluded_fields' => 'image, imagewidth, imageorient, imagecols, imageborder, image_noRows, image_effects, image_compression, tx_impexp_origuid, image_zoom, |
|
10 | 10 | spaceAfter, spaceBefore, |
11 | 11 | uploads_description, uploads_type, |
12 | 12 | media, assets, table_caption, table_delimiter, table_enclosure, table_header_position, table_tfoot, table_bgColor, table_border, table_cellpadding, table_cellspacing, |
@@ -16,39 +16,39 @@ discard block |
||
16 | 16 | target, linkToTop, menu_type, list_type, select_key, |
17 | 17 | file_collections, filelink_size, filelink_sorting, |
18 | 18 | external_media_ratio, external_media_source', |
19 | - 'columns' => [ |
|
20 | - '__checkbox' => [ |
|
21 | - 'renderer' => CheckBoxRenderer::class, |
|
22 | - ], |
|
23 | - 'uid' => [ |
|
24 | - 'visible' => false, |
|
25 | - 'label' => 'Id', |
|
26 | - 'width' => '5px', |
|
27 | - ], |
|
28 | - 'header' => [ |
|
29 | - 'editable' => true, |
|
30 | - 'label' => 'LLL:EXT:vidi/Resources/Private/Language/tt_content.xlf:header', |
|
31 | - ], |
|
32 | - 'tstamp' => [ |
|
33 | - 'visible' => false, |
|
34 | - 'format' => 'Fab\Vidi\Formatter\Date', |
|
35 | - 'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:tstamp', |
|
36 | - ], |
|
37 | - 'crdate' => [ |
|
38 | - 'visible' => false, |
|
39 | - 'format' => 'Fab\Vidi\Formatter\Date', |
|
40 | - 'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:crdate', |
|
41 | - ], |
|
42 | - 'hidden' => [ |
|
43 | - 'renderer' => 'Fab\Vidi\Grid\VisibilityRenderer', |
|
44 | - 'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:active', |
|
45 | - 'width' => '3%', |
|
46 | - ], |
|
47 | - '__buttons' => [ |
|
48 | - 'renderer' => ButtonGroupRenderer::class, |
|
49 | - ], |
|
50 | - ], |
|
51 | - ], |
|
19 | + 'columns' => [ |
|
20 | + '__checkbox' => [ |
|
21 | + 'renderer' => CheckBoxRenderer::class, |
|
22 | + ], |
|
23 | + 'uid' => [ |
|
24 | + 'visible' => false, |
|
25 | + 'label' => 'Id', |
|
26 | + 'width' => '5px', |
|
27 | + ], |
|
28 | + 'header' => [ |
|
29 | + 'editable' => true, |
|
30 | + 'label' => 'LLL:EXT:vidi/Resources/Private/Language/tt_content.xlf:header', |
|
31 | + ], |
|
32 | + 'tstamp' => [ |
|
33 | + 'visible' => false, |
|
34 | + 'format' => 'Fab\Vidi\Formatter\Date', |
|
35 | + 'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:tstamp', |
|
36 | + ], |
|
37 | + 'crdate' => [ |
|
38 | + 'visible' => false, |
|
39 | + 'format' => 'Fab\Vidi\Formatter\Date', |
|
40 | + 'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:crdate', |
|
41 | + ], |
|
42 | + 'hidden' => [ |
|
43 | + 'renderer' => 'Fab\Vidi\Grid\VisibilityRenderer', |
|
44 | + 'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:active', |
|
45 | + 'width' => '3%', |
|
46 | + ], |
|
47 | + '__buttons' => [ |
|
48 | + 'renderer' => ButtonGroupRenderer::class, |
|
49 | + ], |
|
50 | + ], |
|
51 | + ], |
|
52 | 52 | ]; |
53 | 53 | |
54 | 54 | ArrayUtility::mergeRecursiveWithOverrule($GLOBALS['TCA']['tt_content'], $tca); |
@@ -2,7 +2,9 @@ |
||
2 | 2 | use Fab\Vidi\Grid\CheckBoxRenderer; |
3 | 3 | use Fab\Vidi\Grid\ButtonGroupRenderer; |
4 | 4 | use TYPO3\CMS\Core\Utility\ArrayUtility; |
5 | -if (!defined('TYPO3')) die ('Access denied.'); |
|
5 | +if (!defined('TYPO3')) { |
|
6 | + die ('Access denied.'); |
|
7 | +} |
|
6 | 8 | |
7 | 9 | $tca = [ |
8 | 10 | 'grid' => [ |
@@ -7,110 +7,110 @@ |
||
7 | 7 | if (!defined('TYPO3')) die ('Access denied.'); |
8 | 8 | |
9 | 9 | $tca = [ |
10 | - 'ctrl' => [ |
|
11 | - // By default "searchFields" has many fields which has a performance cost when dealing with large data-set. |
|
12 | - // Override search field for performance reason. |
|
13 | - // To restore default values, just replace with this: $GLOBALS['TCA']['fe_users']['ctrl']['searchFields'] . ',usergroup', |
|
14 | - 'searchFields' => 'username, first_name, last_name, usergroup', |
|
15 | - ], |
|
16 | - 'vidi' => [ |
|
17 | - // Special case when the field name does not follow the conventions. |
|
18 | - // Vidi needs a bit of help to find the equivalence fieldName <-> propertyName. |
|
19 | - 'mappings' => [ |
|
20 | - 'lockToDomain' => 'lockToDomain', |
|
21 | - 'TSconfig' => 'tsConfig', |
|
22 | - 'felogin_redirectPid' => 'feLoginRedirectPid', |
|
23 | - 'felogin_forgotHash' => 'feLoginForgotHash', |
|
24 | - ], |
|
25 | - ], |
|
26 | - 'grid' => [ |
|
27 | - 'excluded_fields' => 'lockToDomain, TSconfig, felogin_redirectPid, felogin_forgotHash, auth_token, image', |
|
28 | - 'export' => [ |
|
29 | - 'include_files' => false, |
|
30 | - ], |
|
31 | - 'facets' => [ |
|
32 | - 'uid', |
|
33 | - 'username', |
|
34 | - 'name', |
|
35 | - 'first_name', |
|
36 | - 'last_name', |
|
37 | - 'middle_name', |
|
38 | - 'address', |
|
39 | - 'telephone', |
|
40 | - 'fax', |
|
41 | - 'email', |
|
42 | - 'title', |
|
43 | - 'zip', |
|
44 | - 'city', |
|
45 | - 'country', |
|
46 | - 'company', |
|
47 | - 'usergroup', |
|
48 | - StandardFacet::class => [ |
|
49 | - 'name' => 'disable', |
|
50 | - 'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:active', |
|
51 | - 'suggestions' => [ |
|
52 | - '0' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:active.0', |
|
53 | - '1' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:active.1' |
|
54 | - ] |
|
55 | - ], |
|
56 | - PageFacet::class => [ |
|
57 | - 'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:facet.pid' |
|
58 | - ], |
|
59 | - ], |
|
60 | - 'columns' => [ |
|
61 | - '__checkbox' => [ |
|
62 | - 'renderer' => CheckBoxRenderer::class, |
|
63 | - ], |
|
64 | - 'uid' => [ |
|
65 | - 'visible' => false, |
|
66 | - 'label' => 'Id', |
|
67 | - 'width' => '5px', |
|
68 | - ], |
|
69 | - 'username' => [ |
|
70 | - 'visible' => true, |
|
71 | - 'label' => 'LLL:EXT:vidi/Resources/Private/Language/fe_users.xlf:username', |
|
72 | - 'editable' => true, |
|
73 | - ], |
|
74 | - 'name' => [ |
|
75 | - 'visible' => true, |
|
76 | - 'label' => 'LLL:EXT:vidi/Resources/Private/Language/fe_users.xlf:name', |
|
77 | - 'editable' => true, |
|
78 | - ], |
|
79 | - 'email' => [ |
|
80 | - 'visible' => true, |
|
81 | - 'label' => 'LLL:EXT:vidi/Resources/Private/Language/fe_users.xlf:email', |
|
82 | - 'editable' => true, |
|
83 | - ], |
|
84 | - 'usergroup' => [ |
|
85 | - 'visible' => true, |
|
86 | - 'renderers' => [ |
|
87 | - 'Fab\Vidi\Grid\RelationEditRenderer', |
|
88 | - 'Fab\Vidi\Grid\RelationRenderer', |
|
89 | - ], |
|
90 | - 'editable' => true, |
|
91 | - 'sortable' => false, |
|
92 | - 'label' => 'LLL:EXT:vidi/Resources/Private/Language/fe_users.xlf:usergroup', |
|
93 | - ], |
|
94 | - 'tstamp' => [ |
|
95 | - 'visible' => false, |
|
96 | - 'format' => 'Fab\Vidi\Formatter\Date', |
|
97 | - 'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:tstamp', |
|
98 | - ], |
|
99 | - 'crdate' => [ |
|
100 | - 'visible' => false, |
|
101 | - 'format' => 'Fab\Vidi\Formatter\Date', |
|
102 | - 'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:crdate', |
|
103 | - ], |
|
104 | - 'disable' => [ |
|
105 | - 'renderer' => 'Fab\Vidi\Grid\VisibilityRenderer', |
|
106 | - 'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:active', |
|
107 | - 'width' => '3%', |
|
108 | - ], |
|
109 | - '__buttons' => [ |
|
110 | - 'renderer' => ButtonGroupRenderer::class, |
|
111 | - ], |
|
112 | - ], |
|
113 | - ], |
|
10 | + 'ctrl' => [ |
|
11 | + // By default "searchFields" has many fields which has a performance cost when dealing with large data-set. |
|
12 | + // Override search field for performance reason. |
|
13 | + // To restore default values, just replace with this: $GLOBALS['TCA']['fe_users']['ctrl']['searchFields'] . ',usergroup', |
|
14 | + 'searchFields' => 'username, first_name, last_name, usergroup', |
|
15 | + ], |
|
16 | + 'vidi' => [ |
|
17 | + // Special case when the field name does not follow the conventions. |
|
18 | + // Vidi needs a bit of help to find the equivalence fieldName <-> propertyName. |
|
19 | + 'mappings' => [ |
|
20 | + 'lockToDomain' => 'lockToDomain', |
|
21 | + 'TSconfig' => 'tsConfig', |
|
22 | + 'felogin_redirectPid' => 'feLoginRedirectPid', |
|
23 | + 'felogin_forgotHash' => 'feLoginForgotHash', |
|
24 | + ], |
|
25 | + ], |
|
26 | + 'grid' => [ |
|
27 | + 'excluded_fields' => 'lockToDomain, TSconfig, felogin_redirectPid, felogin_forgotHash, auth_token, image', |
|
28 | + 'export' => [ |
|
29 | + 'include_files' => false, |
|
30 | + ], |
|
31 | + 'facets' => [ |
|
32 | + 'uid', |
|
33 | + 'username', |
|
34 | + 'name', |
|
35 | + 'first_name', |
|
36 | + 'last_name', |
|
37 | + 'middle_name', |
|
38 | + 'address', |
|
39 | + 'telephone', |
|
40 | + 'fax', |
|
41 | + 'email', |
|
42 | + 'title', |
|
43 | + 'zip', |
|
44 | + 'city', |
|
45 | + 'country', |
|
46 | + 'company', |
|
47 | + 'usergroup', |
|
48 | + StandardFacet::class => [ |
|
49 | + 'name' => 'disable', |
|
50 | + 'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:active', |
|
51 | + 'suggestions' => [ |
|
52 | + '0' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:active.0', |
|
53 | + '1' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:active.1' |
|
54 | + ] |
|
55 | + ], |
|
56 | + PageFacet::class => [ |
|
57 | + 'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:facet.pid' |
|
58 | + ], |
|
59 | + ], |
|
60 | + 'columns' => [ |
|
61 | + '__checkbox' => [ |
|
62 | + 'renderer' => CheckBoxRenderer::class, |
|
63 | + ], |
|
64 | + 'uid' => [ |
|
65 | + 'visible' => false, |
|
66 | + 'label' => 'Id', |
|
67 | + 'width' => '5px', |
|
68 | + ], |
|
69 | + 'username' => [ |
|
70 | + 'visible' => true, |
|
71 | + 'label' => 'LLL:EXT:vidi/Resources/Private/Language/fe_users.xlf:username', |
|
72 | + 'editable' => true, |
|
73 | + ], |
|
74 | + 'name' => [ |
|
75 | + 'visible' => true, |
|
76 | + 'label' => 'LLL:EXT:vidi/Resources/Private/Language/fe_users.xlf:name', |
|
77 | + 'editable' => true, |
|
78 | + ], |
|
79 | + 'email' => [ |
|
80 | + 'visible' => true, |
|
81 | + 'label' => 'LLL:EXT:vidi/Resources/Private/Language/fe_users.xlf:email', |
|
82 | + 'editable' => true, |
|
83 | + ], |
|
84 | + 'usergroup' => [ |
|
85 | + 'visible' => true, |
|
86 | + 'renderers' => [ |
|
87 | + 'Fab\Vidi\Grid\RelationEditRenderer', |
|
88 | + 'Fab\Vidi\Grid\RelationRenderer', |
|
89 | + ], |
|
90 | + 'editable' => true, |
|
91 | + 'sortable' => false, |
|
92 | + 'label' => 'LLL:EXT:vidi/Resources/Private/Language/fe_users.xlf:usergroup', |
|
93 | + ], |
|
94 | + 'tstamp' => [ |
|
95 | + 'visible' => false, |
|
96 | + 'format' => 'Fab\Vidi\Formatter\Date', |
|
97 | + 'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:tstamp', |
|
98 | + ], |
|
99 | + 'crdate' => [ |
|
100 | + 'visible' => false, |
|
101 | + 'format' => 'Fab\Vidi\Formatter\Date', |
|
102 | + 'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:crdate', |
|
103 | + ], |
|
104 | + 'disable' => [ |
|
105 | + 'renderer' => 'Fab\Vidi\Grid\VisibilityRenderer', |
|
106 | + 'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:active', |
|
107 | + 'width' => '3%', |
|
108 | + ], |
|
109 | + '__buttons' => [ |
|
110 | + 'renderer' => ButtonGroupRenderer::class, |
|
111 | + ], |
|
112 | + ], |
|
113 | + ], |
|
114 | 114 | ]; |
115 | 115 | |
116 | 116 | ArrayUtility::mergeRecursiveWithOverrule($GLOBALS['TCA']['fe_users'], $tca); |
@@ -4,7 +4,9 @@ |
||
4 | 4 | use Fab\Vidi\Grid\CheckBoxRenderer; |
5 | 5 | use Fab\Vidi\Grid\ButtonGroupRenderer; |
6 | 6 | use TYPO3\CMS\Core\Utility\ArrayUtility; |
7 | -if (!defined('TYPO3')) die ('Access denied.'); |
|
7 | +if (!defined('TYPO3')) { |
|
8 | + die ('Access denied.'); |
|
9 | +} |
|
8 | 10 | |
9 | 11 | $tca = [ |
10 | 12 | 'ctrl' => [ |
@@ -6,58 +6,58 @@ |
||
6 | 6 | if (!defined('TYPO3')) die ('Access denied.'); |
7 | 7 | |
8 | 8 | $tca = [ |
9 | - 'vidi' => [ |
|
10 | - // Special case when the field name does not follow the conventions. |
|
11 | - // Vidi needs a bit of help to find the equivalence fieldName <-> propertyName. |
|
12 | - 'mappings' => [ |
|
13 | - 'lockToDomain' => 'lockToDomain', |
|
14 | - 'TSconfig' => 'tsConfig', |
|
15 | - 'felogin_redirectPid' => 'feLoginRedirectPid', |
|
16 | - ], |
|
17 | - ], |
|
18 | - 'grid' => [ |
|
19 | - 'facets' => [ |
|
20 | - 'uid', |
|
21 | - 'title', |
|
22 | - 'description', |
|
23 | - PageFacet::class => [ |
|
24 | - 'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:facet.pid' |
|
25 | - ] |
|
26 | - ], |
|
27 | - 'columns' => [ |
|
28 | - '__checkbox' => [ |
|
29 | - 'renderer' => CheckBoxRenderer::class, |
|
30 | - ], |
|
31 | - 'uid' => [ |
|
32 | - 'visible' => false, |
|
33 | - 'label' => 'Id', |
|
34 | - 'width' => '5px', |
|
35 | - ], |
|
36 | - 'title' => [ |
|
37 | - 'visible' => true, |
|
38 | - 'label' => 'LLL:EXT:vidi/Resources/Private/Language/fe_groups.xlf:title', |
|
39 | - 'editable' => true, |
|
40 | - ], |
|
41 | - 'tstamp' => [ |
|
42 | - 'visible' => false, |
|
43 | - 'format' => 'Fab\Vidi\Formatter\Date', |
|
44 | - 'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:tstamp', |
|
45 | - ], |
|
46 | - 'crdate' => [ |
|
47 | - 'visible' => false, |
|
48 | - 'format' => 'Fab\Vidi\Formatter\Date', |
|
49 | - 'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:crdate', |
|
50 | - ], |
|
51 | - 'hidden' => [ |
|
52 | - 'renderer' => 'Fab\Vidi\Grid\VisibilityRenderer', |
|
53 | - 'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:visibility_abbreviation', |
|
54 | - 'width' => '3%', |
|
55 | - ], |
|
56 | - '__buttons' => [ |
|
57 | - 'renderer' => ButtonGroupRenderer::class, |
|
58 | - ], |
|
59 | - ] |
|
60 | - ] |
|
9 | + 'vidi' => [ |
|
10 | + // Special case when the field name does not follow the conventions. |
|
11 | + // Vidi needs a bit of help to find the equivalence fieldName <-> propertyName. |
|
12 | + 'mappings' => [ |
|
13 | + 'lockToDomain' => 'lockToDomain', |
|
14 | + 'TSconfig' => 'tsConfig', |
|
15 | + 'felogin_redirectPid' => 'feLoginRedirectPid', |
|
16 | + ], |
|
17 | + ], |
|
18 | + 'grid' => [ |
|
19 | + 'facets' => [ |
|
20 | + 'uid', |
|
21 | + 'title', |
|
22 | + 'description', |
|
23 | + PageFacet::class => [ |
|
24 | + 'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:facet.pid' |
|
25 | + ] |
|
26 | + ], |
|
27 | + 'columns' => [ |
|
28 | + '__checkbox' => [ |
|
29 | + 'renderer' => CheckBoxRenderer::class, |
|
30 | + ], |
|
31 | + 'uid' => [ |
|
32 | + 'visible' => false, |
|
33 | + 'label' => 'Id', |
|
34 | + 'width' => '5px', |
|
35 | + ], |
|
36 | + 'title' => [ |
|
37 | + 'visible' => true, |
|
38 | + 'label' => 'LLL:EXT:vidi/Resources/Private/Language/fe_groups.xlf:title', |
|
39 | + 'editable' => true, |
|
40 | + ], |
|
41 | + 'tstamp' => [ |
|
42 | + 'visible' => false, |
|
43 | + 'format' => 'Fab\Vidi\Formatter\Date', |
|
44 | + 'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:tstamp', |
|
45 | + ], |
|
46 | + 'crdate' => [ |
|
47 | + 'visible' => false, |
|
48 | + 'format' => 'Fab\Vidi\Formatter\Date', |
|
49 | + 'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:crdate', |
|
50 | + ], |
|
51 | + 'hidden' => [ |
|
52 | + 'renderer' => 'Fab\Vidi\Grid\VisibilityRenderer', |
|
53 | + 'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:visibility_abbreviation', |
|
54 | + 'width' => '3%', |
|
55 | + ], |
|
56 | + '__buttons' => [ |
|
57 | + 'renderer' => ButtonGroupRenderer::class, |
|
58 | + ], |
|
59 | + ] |
|
60 | + ] |
|
61 | 61 | ]; |
62 | 62 | |
63 | 63 | ArrayUtility::mergeRecursiveWithOverrule($GLOBALS['TCA']['fe_groups'], $tca); |
@@ -3,7 +3,9 @@ |
||
3 | 3 | use Fab\Vidi\Grid\CheckBoxRenderer; |
4 | 4 | use Fab\Vidi\Grid\ButtonGroupRenderer; |
5 | 5 | use TYPO3\CMS\Core\Utility\ArrayUtility; |
6 | -if (!defined('TYPO3')) die ('Access denied.'); |
|
6 | +if (!defined('TYPO3')) { |
|
7 | + die ('Access denied.'); |
|
8 | +} |
|
7 | 9 | |
8 | 10 | $tca = [ |
9 | 11 | 'vidi' => [ |
@@ -2,88 +2,88 @@ |
||
2 | 2 | if (!defined('TYPO3')) die ('Access denied.'); |
3 | 3 | |
4 | 4 | return [ |
5 | - 'ctrl' => [ |
|
6 | - 'title' => 'LLL:EXT:phpdisplay/Resources/Private/Language/locallang_db.xml:tx_phpdisplay_displays', |
|
7 | - 'label' => 'name', |
|
8 | - 'tstamp' => 'tstamp', |
|
9 | - 'crdate' => 'crdate', |
|
10 | - 'cruser_id' => 'cruser_id', |
|
11 | - 'hideTable' => true, |
|
12 | - 'delete' => 'deleted', |
|
13 | - 'enablecolumns' => [ |
|
14 | - 'disabled' => 'hidden', |
|
15 | - ], |
|
16 | - 'searchFields' => 'type,name,data_type', |
|
17 | - 'typeicon_classes' => [ |
|
18 | - 'default' => 'extensions-vidi-selection', |
|
19 | - ], |
|
20 | - ], |
|
21 | - 'types' => [ |
|
22 | - '1' => ['showitem' => 'hidden,--palette--;;1,type,name,data_type,query'], |
|
23 | - ], |
|
24 | - 'palettes' => [ |
|
25 | - '1' => ['showitem' => ''], |
|
26 | - ], |
|
27 | - 'columns' => [ |
|
5 | + 'ctrl' => [ |
|
6 | + 'title' => 'LLL:EXT:phpdisplay/Resources/Private/Language/locallang_db.xml:tx_phpdisplay_displays', |
|
7 | + 'label' => 'name', |
|
8 | + 'tstamp' => 'tstamp', |
|
9 | + 'crdate' => 'crdate', |
|
10 | + 'cruser_id' => 'cruser_id', |
|
11 | + 'hideTable' => true, |
|
12 | + 'delete' => 'deleted', |
|
13 | + 'enablecolumns' => [ |
|
14 | + 'disabled' => 'hidden', |
|
15 | + ], |
|
16 | + 'searchFields' => 'type,name,data_type', |
|
17 | + 'typeicon_classes' => [ |
|
18 | + 'default' => 'extensions-vidi-selection', |
|
19 | + ], |
|
20 | + ], |
|
21 | + 'types' => [ |
|
22 | + '1' => ['showitem' => 'hidden,--palette--;;1,type,name,data_type,query'], |
|
23 | + ], |
|
24 | + 'palettes' => [ |
|
25 | + '1' => ['showitem' => ''], |
|
26 | + ], |
|
27 | + 'columns' => [ |
|
28 | 28 | |
29 | - 'hidden' => [ |
|
30 | - 'exclude' => 1, |
|
31 | - 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.hidden', |
|
32 | - 'config' => [ |
|
33 | - 'type' => 'check', |
|
34 | - ], |
|
35 | - ], |
|
36 | - 'visibility' => [ |
|
37 | - 'exclude' => 0, |
|
38 | - 'label' => 'LLL:EXT:vidi/Resources/Private/Language/tx_vidi_selection.xlf:visibility', |
|
39 | - 'config' => [ |
|
40 | - 'type' => 'select', |
|
41 | - 'renderType' => 'selectSingle', |
|
42 | - 'items' => [ |
|
43 | - ['LLL:EXT:vidi/Resources/Private/Language/tx_vidi_selection.xlf:visibility.everyone', 0], |
|
44 | - ['LLL:EXT:vidi/Resources/Private/Language/tx_vidi_selection.xlf:visibility.private', 1], |
|
45 | - ['LLL:EXT:vidi/Resources/Private/Language/tx_vidi_selection.xlf:visibility.admin_only', 2], |
|
46 | - ], |
|
47 | - 'size' => 1, |
|
48 | - 'maxitems' => 1, |
|
49 | - 'minitems' => 1, |
|
50 | - ], |
|
51 | - ], |
|
52 | - 'name' => [ |
|
53 | - 'exclude' => 0, |
|
54 | - 'label' => 'LLL:EXT:vidi/Resources/Private/Language/tx_vidi_selection.xlf:name', |
|
55 | - 'config' => [ |
|
56 | - 'type' => 'input', |
|
57 | - 'size' => 30, |
|
58 | - 'eval' => 'trim,required' |
|
59 | - ], |
|
60 | - ], |
|
61 | - 'data_type' => [ |
|
62 | - 'exclude' => 0, |
|
63 | - 'label' => 'LLL:EXT:vidi/Resources/Private/Language/tx_vidi_selection.xlf:data_type', |
|
64 | - 'config' => [ |
|
65 | - 'type' => 'input', |
|
66 | - 'size' => 30, |
|
67 | - 'eval' => 'trim,required' |
|
68 | - ], |
|
69 | - ], |
|
70 | - 'query' => [ |
|
71 | - 'exclude' => 0, |
|
72 | - 'label' => 'LLL:EXT:vidi/Resources/Private/Language/tx_vidi_selection.xlf:query', |
|
73 | - 'config' => [ |
|
74 | - 'type' => 'text', |
|
75 | - 'rows' => 5, |
|
76 | - 'cols' => 5, |
|
77 | - ], |
|
78 | - ], |
|
79 | - 'speaking_query' => [ |
|
80 | - 'exclude' => 0, |
|
81 | - 'label' => 'LLL:EXT:vidi/Resources/Private/Language/tx_vidi_selection.xlf:speaking_query', |
|
82 | - 'config' => [ |
|
83 | - 'type' => 'text', |
|
84 | - 'rows' => 5, |
|
85 | - 'cols' => 5, |
|
86 | - ], |
|
87 | - ], |
|
88 | - ], |
|
29 | + 'hidden' => [ |
|
30 | + 'exclude' => 1, |
|
31 | + 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.hidden', |
|
32 | + 'config' => [ |
|
33 | + 'type' => 'check', |
|
34 | + ], |
|
35 | + ], |
|
36 | + 'visibility' => [ |
|
37 | + 'exclude' => 0, |
|
38 | + 'label' => 'LLL:EXT:vidi/Resources/Private/Language/tx_vidi_selection.xlf:visibility', |
|
39 | + 'config' => [ |
|
40 | + 'type' => 'select', |
|
41 | + 'renderType' => 'selectSingle', |
|
42 | + 'items' => [ |
|
43 | + ['LLL:EXT:vidi/Resources/Private/Language/tx_vidi_selection.xlf:visibility.everyone', 0], |
|
44 | + ['LLL:EXT:vidi/Resources/Private/Language/tx_vidi_selection.xlf:visibility.private', 1], |
|
45 | + ['LLL:EXT:vidi/Resources/Private/Language/tx_vidi_selection.xlf:visibility.admin_only', 2], |
|
46 | + ], |
|
47 | + 'size' => 1, |
|
48 | + 'maxitems' => 1, |
|
49 | + 'minitems' => 1, |
|
50 | + ], |
|
51 | + ], |
|
52 | + 'name' => [ |
|
53 | + 'exclude' => 0, |
|
54 | + 'label' => 'LLL:EXT:vidi/Resources/Private/Language/tx_vidi_selection.xlf:name', |
|
55 | + 'config' => [ |
|
56 | + 'type' => 'input', |
|
57 | + 'size' => 30, |
|
58 | + 'eval' => 'trim,required' |
|
59 | + ], |
|
60 | + ], |
|
61 | + 'data_type' => [ |
|
62 | + 'exclude' => 0, |
|
63 | + 'label' => 'LLL:EXT:vidi/Resources/Private/Language/tx_vidi_selection.xlf:data_type', |
|
64 | + 'config' => [ |
|
65 | + 'type' => 'input', |
|
66 | + 'size' => 30, |
|
67 | + 'eval' => 'trim,required' |
|
68 | + ], |
|
69 | + ], |
|
70 | + 'query' => [ |
|
71 | + 'exclude' => 0, |
|
72 | + 'label' => 'LLL:EXT:vidi/Resources/Private/Language/tx_vidi_selection.xlf:query', |
|
73 | + 'config' => [ |
|
74 | + 'type' => 'text', |
|
75 | + 'rows' => 5, |
|
76 | + 'cols' => 5, |
|
77 | + ], |
|
78 | + ], |
|
79 | + 'speaking_query' => [ |
|
80 | + 'exclude' => 0, |
|
81 | + 'label' => 'LLL:EXT:vidi/Resources/Private/Language/tx_vidi_selection.xlf:speaking_query', |
|
82 | + 'config' => [ |
|
83 | + 'type' => 'text', |
|
84 | + 'rows' => 5, |
|
85 | + 'cols' => 5, |
|
86 | + ], |
|
87 | + ], |
|
88 | + ], |
|
89 | 89 | ]; |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | class LanguageFileGenerator implements SingletonInterface |
20 | 20 | { |
21 | 21 | |
22 | - protected $template = '<?xml version="1.0" encoding="UTF-8"?> |
|
22 | + protected $template = '<?xml version="1.0" encoding="UTF-8"?> |
|
23 | 23 | <xliff version="1.0"> |
24 | 24 | <file source-language="en" datatype="plaintext" original="messages" date="" product-name="local lang module"> |
25 | 25 | <header/> |
@@ -37,58 +37,58 @@ discard block |
||
37 | 37 | </file> |
38 | 38 | </xliff>'; |
39 | 39 | |
40 | - /** |
|
41 | - * @param string $dataType |
|
42 | - * @return string |
|
43 | - */ |
|
44 | - public function generate($dataType) |
|
45 | - { |
|
46 | - $label = $dataType; |
|
47 | - if (!empty($GLOBALS['TCA'][$dataType]['ctrl']['title'])) { |
|
48 | - $label = $this->getLanguageService()->sL($GLOBALS['TCA'][$dataType]['ctrl']['title']); |
|
49 | - } |
|
40 | + /** |
|
41 | + * @param string $dataType |
|
42 | + * @return string |
|
43 | + */ |
|
44 | + public function generate($dataType) |
|
45 | + { |
|
46 | + $label = $dataType; |
|
47 | + if (!empty($GLOBALS['TCA'][$dataType]['ctrl']['title'])) { |
|
48 | + $label = $this->getLanguageService()->sL($GLOBALS['TCA'][$dataType]['ctrl']['title']); |
|
49 | + } |
|
50 | 50 | |
51 | - // Generate language file. |
|
52 | - $languageFile = $this->getLanguageFile($dataType); |
|
53 | - $content = str_replace('{module_name}', $label, $this->template); |
|
54 | - GeneralUtility::writeFileToTypo3tempDir($languageFile, $content); |
|
51 | + // Generate language file. |
|
52 | + $languageFile = $this->getLanguageFile($dataType); |
|
53 | + $content = str_replace('{module_name}', $label, $this->template); |
|
54 | + GeneralUtility::writeFileToTypo3tempDir($languageFile, $content); |
|
55 | 55 | |
56 | - return 'LLL:' . $languageFile; |
|
57 | - } |
|
56 | + return 'LLL:' . $languageFile; |
|
57 | + } |
|
58 | 58 | |
59 | - /** |
|
60 | - * @param $dataType |
|
61 | - * @return string |
|
62 | - */ |
|
63 | - protected function getLanguageFile($dataType) |
|
64 | - { |
|
65 | - return $this->getLanguageDirectory() . '/' . $dataType . '.xlf'; |
|
66 | - } |
|
59 | + /** |
|
60 | + * @param $dataType |
|
61 | + * @return string |
|
62 | + */ |
|
63 | + protected function getLanguageFile($dataType) |
|
64 | + { |
|
65 | + return $this->getLanguageDirectory() . '/' . $dataType . '.xlf'; |
|
66 | + } |
|
67 | 67 | |
68 | - /** |
|
69 | - * @return string |
|
70 | - */ |
|
71 | - protected function getLanguageDirectory() |
|
72 | - { |
|
73 | - // Create language file dynamically |
|
74 | - $languageDirectory = Environment::getPublicPath() . '/typo3temp/vidi'; |
|
75 | - if (!is_dir($languageDirectory)) { |
|
76 | - GeneralUtility::mkdir($languageDirectory); |
|
77 | - } |
|
78 | - return $languageDirectory; |
|
79 | - } |
|
68 | + /** |
|
69 | + * @return string |
|
70 | + */ |
|
71 | + protected function getLanguageDirectory() |
|
72 | + { |
|
73 | + // Create language file dynamically |
|
74 | + $languageDirectory = Environment::getPublicPath() . '/typo3temp/vidi'; |
|
75 | + if (!is_dir($languageDirectory)) { |
|
76 | + GeneralUtility::mkdir($languageDirectory); |
|
77 | + } |
|
78 | + return $languageDirectory; |
|
79 | + } |
|
80 | 80 | |
81 | - /** |
|
82 | - * @return LanguageService |
|
83 | - */ |
|
84 | - protected function getLanguageService() |
|
85 | - { |
|
86 | - $locale = $GLOBALS['BE_USER']->uc['lang'] ?? ''; |
|
87 | - if ($locale === '') { |
|
88 | - $locale = 'en'; |
|
89 | - } |
|
90 | - $languageServiceFactory = GeneralUtility::makeInstance(LanguageServiceFactory::class); |
|
91 | - return $languageServiceFactory->create($locale); |
|
92 | - } |
|
81 | + /** |
|
82 | + * @return LanguageService |
|
83 | + */ |
|
84 | + protected function getLanguageService() |
|
85 | + { |
|
86 | + $locale = $GLOBALS['BE_USER']->uc['lang'] ?? ''; |
|
87 | + if ($locale === '') { |
|
88 | + $locale = 'en'; |
|
89 | + } |
|
90 | + $languageServiceFactory = GeneralUtility::makeInstance(LanguageServiceFactory::class); |
|
91 | + return $languageServiceFactory->create($locale); |
|
92 | + } |
|
93 | 93 | |
94 | 94 | } |