forked from pgampe/typo3-guide
-
Notifications
You must be signed in to change notification settings - Fork 8
/
ext_localconf.php
62 lines (61 loc) · 2.25 KB
/
ext_localconf.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
<?php
if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
if (TYPO3_MODE === 'BE') {
// Add tour libraries
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_pagerenderer.php']['render-preProcess'][] =
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Classes/Hooks/PageRenderer.php:Tx\\Guide\\Hooks\\PageRenderer->addJSCSS';
// Add AJAX
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::registerAjaxHandler (
'GuideController::ajaxRequest',
'Tx\\Guide\\Controller\\GuideController->ajaxRequest'
);
// Add page typoscript tours
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:' . $_EXTKEY . '/Configuration/PageTS/tsconfig.txt">');
}
// Register a guided tour
$tours = array(
'AboutModule' => array(
'moduleIdentifier' => 'help_AboutAboutmodules',
'iconIdentifier' => 'module-guide-tour-core'
),
'PageModule' => array(
'moduleIdentifier' => 'web_layout',
'iconIdentifier' => 'module-guide-tour-page-module'
),
'ViewModule' => array(
'moduleIdentifier' => 'web_ViewpageView',
'iconIdentifier' => 'module-guide-tour-view-module'
),
'FunctionModule' => array(
'moduleIdentifier' => 'web_func',
'iconIdentifier' => 'module-guide-tour-function-module'
),
'Tree' => array(
'moduleIdentifier' => 'core',
'iconIdentifier' => 'module-guide-tour-core'
),
'Topbar' => array(
'moduleIdentifier' => 'core',
'iconIdentifier' => 'module-guide-tour-core'
),
'Menu' => array(
'moduleIdentifier' => 'core',
'iconIdentifier' => 'module-guide-tour-core'
),
'CreatePageByPageTreeContextMenu' => array(
'moduleIdentifier' => 'web_layout',
'iconIdentifier' => 'actions-page-new'
),
);
foreach($tours as $tourKey => $tour) {
\Tx\Guide\Utility\GuideUtility::addTour(
$tourKey,
'LLL:EXT:guide/Resources/Private/Language/BootstrapTour' . $tourKey . '.xlf:tx_guide_tour.title',
'LLL:EXT:guide/Resources/Private/Language/BootstrapTour' . $tourKey . '.xlf:tx_guide_tour.description',
$tour['moduleIdentifier'],
$tour['iconIdentifier'],
'EXT:guide/Configuration/Tours/'
);
}