forked from Yoast/Yoast-SEO-for-TYPO3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathext_tables.php
105 lines (98 loc) · 3.64 KB
/
ext_tables.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
<?php
if (TYPO3_MODE === 'BE') {
$GLOBALS['TBE_MODULES'] = array_slice($GLOBALS['TBE_MODULES'], 0, 1, true) +
['yoast' => ''] +
array_slice($GLOBALS['TBE_MODULES'], 1, count($GLOBALS['TBE_MODULES']) - 1, true);
if (version_compare(TYPO3_branch, '8.0', '>=')) {
$GLOBALS['TBE_MODULES']['_configuration']['yoast'] = [
'iconIdentifier' => 'module-yoast',
'labels' => 'LLL:EXT:yoast_seo/Resources/Private/Language/BackendModule.xlf',
'name' => 'yoast'
];
} else {
$GLOBALS['TBE_MODULES']['_configuration']['yoast'] = [
'iconIdentifier' => 'module-yoast',
'labels' => [
'll_ref' => 'LLL:EXT:yoast_seo/Resources/Private/Language/BackendModule.xlf'
],
'name' => 'yoast'
];
}
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
'YoastSeoForTypo3.' . $_EXTKEY,
'yoast',
'dashboard',
'',
array(
'Module' => 'dashboard',
),
array(
'access' => 'user,group',
'icon' => 'EXT:' . $_EXTKEY . '/Resources/Public/Images/Yoast-module-dashboard.svg',
'labels' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/BackendModuleDashboard.xlf',
)
);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
'YoastSeoForTypo3.' . $_EXTKEY,
'yoast',
'overview',
'',
array(
'Overview' => 'list',
),
array(
'access' => 'user,group',
'icon' => 'EXT:' . $_EXTKEY . '/Resources/Public/Images/Yoast-module-overview.svg',
'labels' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/BackendModuleOverview.xlf',
)
);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
'YoastSeoForTypo3.' . $_EXTKEY,
'yoast',
'premium',
'',
array(
'Module' => 'premium',
),
array(
'access' => 'user,group',
'icon' => 'EXT:' . $_EXTKEY . '/Resources/Public/Images/Yoast-module-premium.svg',
'labels' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/BackendModulePremium.xlf',
)
);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
'YoastSeoForTypo3.' . $_EXTKEY,
'yoast',
'update',
'',
array(
'Module' => 'update, doConvert',
),
array(
'access' => 'user,group',
'icon' => 'EXT:' . $_EXTKEY . '/Resources/Public/Images/Yoast-module-update.svg',
'labels' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/BackendModuleUpdate.xlf',
)
);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
'YoastSeoForTypo3.' . $_EXTKEY,
'yoast',
'settings',
'',
array(
'Module' => 'settings, saveSettings',
),
array(
'access' => 'user,group',
'icon' => 'EXT:' . $_EXTKEY . '/Resources/Public/Images/Yoast-module-settings.svg',
'labels' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/BackendModuleSettings.xlf',
)
);
// Extend user settings
$GLOBALS['TYPO3_USER_SETTINGS']['columns']['hideYoastInPageModule'] = [
'label' => 'LLL:EXT:yoast_seo/Resources/Private/Language/BackendModule.xlf:usersettings.hideYoastInPageModule',
'type' => 'check'
];
$GLOBALS['TYPO3_USER_SETTINGS']['showitem'] .= ',
--div--;LLL:EXT:yoast_seo/Resources/Private/Language/BackendModule.xlf:usersettings.title,hideYoastInPageModule';
}