114 lines
4.7 KiB
PHP
114 lines
4.7 KiB
PHP
|
<?php
|
||
|
defined('TYPO3_MODE') || die();
|
||
|
|
||
|
|
||
|
/* ===========================================================================
|
||
|
Hooks
|
||
|
=========================================================================== */
|
||
|
// Add wizard with map for setting geo location
|
||
|
//$GLOBALS['TYPO3_CONF_VARS']['SYS']['formEngine']['nodeRegistry'][1650971528] = [
|
||
|
// 'nodeName' => 'latLonMapWizard',
|
||
|
// 'priority' => 31,
|
||
|
// 'class' => \A2G\A2gTravelBlog\FormEngine\FieldControl\LocationMapWizard::class
|
||
|
//];
|
||
|
|
||
|
|
||
|
// PageTS
|
||
|
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:a2g_travel_blog/Configuration/TsConfig/Page/All.tsconfig">');
|
||
|
|
||
|
call_user_func(static function() {
|
||
|
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
|
||
|
'A2gTravelBlog',
|
||
|
'timeline',
|
||
|
[
|
||
|
\A2G\A2gTravelBlog\Controller\TravelPostController::class => 'timeline'
|
||
|
],
|
||
|
// non-cacheable actions
|
||
|
[
|
||
|
\A2G\A2gTravelBlog\Controller\TravelPostController::class => ''
|
||
|
]
|
||
|
);
|
||
|
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
|
||
|
'A2gTravelBlog',
|
||
|
'map',
|
||
|
[
|
||
|
\A2G\A2gTravelBlog\Controller\MapController::class => 'map, popup, allMapMarkers, postMapMarkers, mapMarkersFromCategories,activeCountriesGeojson, activeCountryGeojson,mapMarkersFromAuthor'
|
||
|
],
|
||
|
// non-cacheable actions
|
||
|
[
|
||
|
\A2G\A2gTravelBlog\Controller\MapController::class => ''
|
||
|
]
|
||
|
);
|
||
|
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
|
||
|
'A2gTravelBlog',
|
||
|
'mapConfig',
|
||
|
[
|
||
|
\A2G\A2gTravelBlog\Controller\MapController::class => 'mapConfig, popup, allMapMarkers, postMapMarkers, mapMarkersFromCategories, activeCountriesGeojson, activeCountryGeojson,mapMarkersFromAuthor,mapMarkersFromTag'
|
||
|
],
|
||
|
// non-cacheable actions
|
||
|
[
|
||
|
\A2G\A2gTravelBlog\Controller\MapController::class => ''
|
||
|
]
|
||
|
);
|
||
|
|
||
|
|
||
|
// wizards
|
||
|
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
|
||
|
'mod {
|
||
|
wizards.newContentElement.wizardItems.plugins {
|
||
|
elements {
|
||
|
travelblogtimeline {
|
||
|
iconIdentifier = a2g_travelblog-plugin-timeline
|
||
|
title = LLL:EXT:a2g_travel_blog/Resources/Private/Language/locallang_db.xlf:a2gtravelblog_timeline.name
|
||
|
description = LLL:EXT:a2g_travel_blog/Resources/Private/Language/locallang_db.xlf:a2gtravelblog_timeline.description
|
||
|
tt_content_defValues {
|
||
|
CType = list
|
||
|
list_type = a2gtravelblog_timeline
|
||
|
}
|
||
|
}
|
||
|
travelblogmap {
|
||
|
iconIdentifier = a2g_travelblog-plugin-map
|
||
|
title = LLL:EXT:a2g_travel_blog/Resources/Private/Language/locallang_db.xlf:a2gtravelblog_map.name
|
||
|
description = LLL:EXT:a2g_travel_blog/Resources/Private/Language/locallang_db.xlf:a2gtravelblog_map.description
|
||
|
tt_content_defValues {
|
||
|
CType = list
|
||
|
list_type = a2gtravelblog_map
|
||
|
}
|
||
|
}
|
||
|
travelblogmapconfig {
|
||
|
iconIdentifier = a2g_travelblog-plugin-mapconfig
|
||
|
title = LLL:EXT:a2g_travel_blog/Resources/Private/Language/locallang_db.xlf:a2gtravelblog_mapconfig.name
|
||
|
description = LLL:EXT:a2g_travel_blog/Resources/Private/Language/locallang_db.xlf:a2gtravelblog_mapconfig.description
|
||
|
tt_content_defValues {
|
||
|
CType = list
|
||
|
list_type = a2gtravelblog_map
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
show = *
|
||
|
}
|
||
|
}'
|
||
|
);
|
||
|
|
||
|
$pluginIcons = [
|
||
|
'a2g_travelblog-plugin-timeline' => 'EXT:a2g_travel_blog/Resources/Public/Icons/timeline.png',
|
||
|
'a2g_travelblog-plugin-map' => 'EXT:a2g_travel_blog/Resources/Public/Icons/map.png',
|
||
|
'a2g_travelblog-plugin-mapconfig' => 'EXT:a2g_travel_blog/Resources/Public/Icons/map.png',
|
||
|
];
|
||
|
|
||
|
$iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class);
|
||
|
|
||
|
foreach($pluginIcons as $key => $icon){
|
||
|
$iconRegistry->registerIcon(
|
||
|
$key,
|
||
|
\TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class,
|
||
|
['source' => $icon]
|
||
|
);
|
||
|
}
|
||
|
});
|
||
|
|
||
|
/***************
|
||
|
* Register "a2g" as global fluid namespace
|
||
|
*/
|
||
|
//$GLOBALS['TYPO3_CONF_VARS']['SYS']['fluid']['namespacesC']['a2gprod'][] = 'A2G\\A2gTravelBlog\\ViewHelpers';
|