-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathfe_users.php
119 lines (115 loc) · 4.26 KB
/
fe_users.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<?php
use Fab\Vidi\Facet\StandardFacet;
use Fab\Vidi\Facet\PageFacet;
use Fab\Vidi\Grid\CheckBoxRenderer;
use Fab\Vidi\Grid\ButtonGroupRenderer;
use TYPO3\CMS\Core\Utility\ArrayUtility;
if (!defined('TYPO3')) {
die('Access denied.');
}
$tca = [
'ctrl' => [
// By default "searchFields" has many fields which has a performance cost when dealing with large data-set.
// Override search field for performance reason.
// To restore default values, just replace with this: $GLOBALS['TCA']['fe_users']['ctrl']['searchFields'] . ',usergroup',
'searchFields' => 'username, first_name, last_name, usergroup',
],
'vidi' => [
// Special case when the field name does not follow the conventions.
// Vidi needs a bit of help to find the equivalence fieldName <-> propertyName.
'mappings' => [
'lockToDomain' => 'lockToDomain',
'TSconfig' => 'tsConfig',
'felogin_redirectPid' => 'feLoginRedirectPid',
'felogin_forgotHash' => 'feLoginForgotHash',
],
],
'grid' => [
'excluded_fields' => 'lockToDomain, TSconfig, felogin_redirectPid, felogin_forgotHash, auth_token, image',
'export' => [
'include_files' => false,
],
'facets' => [
'uid',
'username',
'name',
'first_name',
'last_name',
'address',
'telephone',
'fax',
'email',
'title',
'zip',
'city',
'country',
'company',
'usergroup',
StandardFacet::class => [
'name' => 'disable',
'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:active',
'suggestions' => [
'0' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:active.0',
'1' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:active.1'
]
],
PageFacet::class => [
'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:facet.pid'
],
],
'columns' => [
'__checkbox' => [
'renderer' => CheckBoxRenderer::class,
],
'uid' => [
'visible' => false,
'label' => 'Id',
'width' => '5px',
],
'username' => [
'visible' => true,
'label' => 'LLL:EXT:vidi/Resources/Private/Language/fe_users.xlf:username',
'editable' => true,
],
'name' => [
'visible' => true,
'label' => 'LLL:EXT:vidi/Resources/Private/Language/fe_users.xlf:name',
'editable' => true,
],
'email' => [
'visible' => true,
'label' => 'LLL:EXT:vidi/Resources/Private/Language/fe_users.xlf:email',
'editable' => true,
],
'usergroup' => [
'visible' => true,
'renderers' => [
'Fab\Vidi\Grid\RelationEditRenderer',
'Fab\Vidi\Grid\RelationRenderer',
],
'editable' => true,
'sortable' => false,
'label' => 'LLL:EXT:vidi/Resources/Private/Language/fe_users.xlf:usergroup',
],
'tstamp' => [
'visible' => false,
'format' => 'Fab\Vidi\Formatter\Date',
'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:tstamp',
],
'crdate' => [
'visible' => false,
'format' => 'Fab\Vidi\Formatter\Date',
'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:crdate',
],
#'disable' => [
# 'renderer' => 'Fab\Vidi\Grid\VisibilityRenderer',
# 'label' => 'LLL:EXT:vidi/Resources/Private/Language/locallang.xlf:active',
# 'width' => '3%',
#],
'__buttons' => [
'renderer' => ButtonGroupRenderer::class,
],
],
],
];
ArrayUtility::mergeRecursiveWithOverrule($GLOBALS['TCA']['fe_users'], $tca);