initial commit

This commit is contained in:
origin 2023-12-04 16:36:56 +01:00
commit e5dd88a27c
64 changed files with 4545 additions and 0 deletions

View File

@ -0,0 +1,281 @@
<?php
declare(strict_types=1);
namespace A2G\A2gMaps\Controller;
use A2G\A2gMaps\Domain\Traits\{
InjectMapEntryRepositoryTrait,
InjectMarkerRepositoryTrait,
InjectImageServiceTrait,
InjectSysFileReferenceRepositoryTrait,
InjectObjectManagerTrait
};
use A2G\A2gMaps\Utility\MapConfigUtility;
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder;
use TYPO3\CMS\Extbase\Object\ObjectManager;
use TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext;
use TYPO3\CMS\Fluid\View\TemplateView;
use TYPO3\CMS\Fluid\View\StandaloneView;
use TYPO3\CMS\Core\Resource\ResourceFactory;
/**
* This file is part of the "Products" Extension for TYPO3 CMS.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* (c) 2021 Raphael Martin <raphy.martin@gmail.com>, none
*/
/**
* MapController
*/
class MapController extends ActionController {
use InjectMapEntryRepositoryTrait;
use InjectMarkerRepositoryTrait;
use InjectImageServiceTrait;
use InjectSysFileReferenceRepositoryTrait;
private static $mapIcons = null;
/**
*
* @param UriBuilder $uriBuilder
* @param TemplateView $sourceView
* @param type $arguments
* @param type $actionName
* @param type $controllerName
* @return StandaloneView
*/
static private function generateContent(UriBuilder $uriBuilder, TemplateView &$sourceView, $arguments = [], $actionName = 'popup', $controllerName = 'Map'): StandaloneView {
$templatePath = $controllerName . '/' . ucfirst($actionName);
$objectManager = GeneralUtility::makeInstance(ObjectManager::class);
$templateRootPaths = $sourceView->getTemplateRootPaths();
$context = $objectManager->get(ControllerContext::class);
$request =$objectManager->get(\TYPO3\CMS\Extbase\Mvc\Request::class);
$context->setRequest($request);
$context->setUriBuilder($uriBuilder);
/**
* @var StandaloneView $view
*/
$view = GeneralUtility::makeInstance(StandaloneView::class);
$view->setControllerContext($context);
$view->setLayoutRootPaths($sourceView->getLayoutRootPaths());
$view->setTemplateRootPaths($templateRootPaths);
$view->setPartialRootPaths($sourceView->getPartialRootPaths());
$view->setTemplate($templatePath);
$arguments['today'] = (new \DateTime())->format('d.m.Y');
$view->assignMultiple($arguments);
// \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($arguments);
// die();
return $view;
}
private function setMapMarkerIcons(){
if (self::$mapIcons === null) {
self::$mapIcons = [];
$markers = $this->markerRepository->findAll();
foreach ($markers as $marker) {
if ($marker->getMapIcon() !== null) {
self::$mapIcons[] = [
'uid' => 'i-' . $marker->getUid(),
'icon' => $this->imageService->getImageUri($this->imageService->applyProcessingInstructions($this->imageService->getImage('', $marker->getMapIcon(), false), []), true)
];
}
}
}
}
/**
* action map
*
* @return string|object|null|void
*/
public function mapAction() {
if ((int) $this->settings['gpxData'] > 0) {
$tmp = $this->sysFileReferenceRepository->findByTablename('tt_content', (int) $this->configurationManager->getContentObject()->data['uid']);
$resourceFactory = GeneralUtility::makeInstance(ResourceFactory::class);
$file = $resourceFactory->getFileReferenceObject($tmp[0]->getUid());
$showGpxData=true;
} else {
$showGpxData=false;
}
$this->setMapMarkerIcons();
if(array_key_exists('markers',$this->settings) && $this->settings['markers'] !== null){
$markers = explode(',', $this->settings['markers']);
if(count($markers)>0){
$showMarkers = true;
$this->uriBuilder->setTargetPageType(1652369510);
$markerUri = $this->uriBuilder->uriFor('mapMarkers', ['ttContentUid'=>(int) $this->configurationManager->getContentObject()->data['uid']]);
if((bool)$this->settings['showMarkerList'] === true && !empty($markers)){
if(array_key_exists('markerListOrderBy', $markers)){
$mapEntries=$this->mapEntryRepository->getFromUids($markers, $this->settings['markerListOrderBy']);
} else {
$mapEntries=$this->mapEntryRepository->getFromUids($markers);
}
$mapEntriesSort = [];
foreach($mapEntries as $mapEntrie){
if(array_key_exists($mapEntrie->getRegion(),$mapEntriesSort)){
$mapEntriesSort[$mapEntrie->getRegion()][]=$mapEntrie;
} else {
$mapEntriesSort[$mapEntrie->getRegion()]=[];
$mapEntriesSort[$mapEntrie->getRegion()][]=$mapEntrie;
}
}
$this->view->assign('mapEntries', $mapEntriesSort);
}
} else {
$showMarkers = false;
}
}else {
$showMarkers = false;
}
if(array_key_exists('layers',$this->settings) && $this->settings['layers'] !== null){
$layerIds = explode(',', $this->settings['layers']);
} else {
$layerIds = [];
}
$this->view->assignMultiple([
'mapId' => 'a2g-map-' . uniqid(),
'countMapLayers' => count($layerIds),
'mapIcons' => \GuzzleHttp\json_encode(self::$mapIcons),
'mapConfig' => \GuzzleHttp\json_encode(MapConfigUtility::getMapConfig(
$layerIds,
$showGpxData === true ? $file->getOriginalFile()->getPublicUrl() : null,
$showMarkers === true ? $markerUri : null,
$this->settings['defaultMapMarker'],
(int)$this->settings['zoom'],
(int)$this->settings['maxZoom'], (float)$this->settings['centerLon'], (float)$this->settings['centerLat'],
(bool)$this->settings['useZoomSlider'], (bool)$this->settings['useFullscreenButton'], (bool)$this->settings['useLayerSwitcher']))
]);
}
/**
* action mapMarkers
*
* @return string|object|null|void
*/
public function mapMarkersAction() {
if($this->mapEntryRepository->findAll()->count() > 0){
$markersUids = $this->mapEntryRepository->getEntriesFromMap((int)GeneralUtility::_GET('tx_a2gmaps_map')['ttContentUid']);
$markers = $this->mapEntryRepository->getFromUids($markersUids);
if($markers===null){
$markers = [];
}
} else {
$markers=[];
}
$out = [
"type" => "FeatureCollection",
"totalFeatures" => count($markers),
"csr" => MapConfigUtility::getMarkerCsr(),
"features" => []
];
foreach ($markers as $marker) {
if ($marker->getRelMarker() !== null) {
$tmpIcon = "i-" . $marker->getRelMarker()->getUid();
} else {
$tmpIcon = null;
}
$out["features"][] = MapConfigUtility::getMarker($marker, $tmpIcon, self::generateContent( $this->uriBuilder, $this->view, ['mapEntry' => $marker ])->render());
}
return \GuzzleHttp\json_encode($out);
}
/**
* action popup
*
* @return string|object|null|void
*/
public function MapEntry() {
}
/**
* action list
*
* @return string|object|null|void
*/
public function listAction() {
}
/**
* action ajaxListAction
*
* @return string|object|null|void
*/
public function ajaxListAction() {
}
// /**
// * action show
// *
// * @param Ingredients $ingredient
// * @return string|object|null|void
// */
// public function showAction(Ingredients $ingredient) {
// $titleProvider = GeneralUtility::makeInstance(A2gPageTitleProvider::class);
//
// if($this->settings['pageTitleSuffix'] !== null && $this->settings['pageTitleSuffix'] !== '' && (strlen($ingredient->getTitle()) + strlen($this->settings['pageTitleSuffix'])) < 66 ){
// $pageTitle = $ingredient->getTitle(). ' ' . $this->settings['pageTitleSuffix'];
// } else {
// $pageTitle = $ingredient->getTitle();
// }
// $titleProvider->setTitle($pageTitle);
// $contentObject = GeneralUtility::makeInstance(ContentObjectRenderer::class);
// $description = $contentObject->crop($ingredient->getDescription(), 125 . '|...|' . true);
//
// $uri = $this->uriBuilder->reset()->setCreateAbsoluteUri(true)->setTargetPageUid(
// $GLOBALS['TSFE']->id)->uriFor('show', ['ingredient' => $ingredient], 'Ingredients', 'a2gProducts', 'ingredientsdetail');
//
// $metaTagManager = GeneralUtility::makeInstance(MetaTagManagerRegistry::class);
//
// $metaTagManager->getManagerForProperty('robots')->addProperty('robots', 'index, folow');
// $metaTagManager->getManagerForProperty('og:type')->addProperty('og:type', 'website');
// $metaTagManager->getManagerForProperty('twitter:card')->addProperty('twitter:card', 'summary_large_image');
//
// if ($ingredient->getTitle() !== '') {
// $metaTagManager->getManagerForProperty('title')->addProperty('title', $pageTitle);
// $metaTagManager->getManagerForProperty('og:title')->addProperty('og:title', $pageTitle);
// $metaTagManager->getManagerForProperty('twitter:title')->addProperty('twitter:title', $pageTitle);
// }
// if ($ingredient->getDescription() !== '') {
// $metaTagManager->getManagerForProperty('description')->addProperty('description', $description);
// $metaTagManager->getManagerForProperty('og:description')->addProperty('og:description', $description);
// $metaTagManager->getManagerForProperty('twitter:description')->addProperty('twitter:description', $description);
// }
// $metaTagManager->getManagerForProperty('og:url')->addProperty('og:url', $uri);
// $metaTagManager->getManagerForProperty('twitter:url')->addProperty('twitter:url', $uri);
//
// if ($ingredient->getImage() !== null) {
// $processedImage = $this->imageService->applyProcessingInstructions(
// $this->imageService->getImage('', $ingredient->getImage(), false),
// ['width' => '
// 1200', 'height' => '630c']
// );
// $metaTagManager->getManagerForProperty('twitter:image')->addProperty('twitter:image', $this->imageService->getImageUri($processedImage, true));
// $metaTagManager->getManagerForProperty('og:image')->addProperty('og:image', $this->imageService->getImageUri($processedImage, true));
// }
// $this->view->assign('ingredient', $ingredient);
// }
}

281
Classes/Domain/Model/MapEntry.php Executable file
View File

@ -0,0 +1,281 @@
<?php
declare(strict_types=1);
namespace A2G\A2gMaps\Domain\Model;
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
use TYPO3\CMS\Extbase\Domain\Model\FileReference;
use TYPO3\CMS\Extbase\Annotation\ORM\{
Cascade,
Lazy
};
use TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy;
/**
* This file is part of the "altogether Products" Extension for TYPO3 CMS.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* (c) 2021 Raphael Martin <raphy.martin@gmail.com>, none
*/
/**
* MapEntry
*/
class MapEntry extends AbstractEntity {
/**
*
* @var string
*/
protected $addressline = '';
/**
*
* @var string
*/
protected $zip = '';
/**
*
* @var string
*/
protected $city = '';
/**
*
* @var string
*/
protected $region = '';
/**
* latitude
*
* @var float
*/
protected $latitude = 0.0;
/**
* longitude
*
* @var float
*/
protected $longitude = 0.0;
/**
* title
*
* @var string
*/
protected $title = '';
/**
* pathSegment
*
* @var string
*/
protected $pathSegment = '';
/**
* popupContent
*
* @var string
*/
protected $popupContent = '';
/**
*
* @var string
*/
protected $navToUrl = '';
/**
* image
*
* @var FileReference
* @Cascade("remove")
* @Lazy
*/
protected $image = null;
/**
* relMarker
*
* @var Marker
* @Lazy
*/
protected $relMarker = null;
/**
*
* @return float
*/
public function getLatitude(): float {
return $this->latitude;
}
/**
*
* @return float
*/
public function getLongitude(): float {
return $this->longitude;
}
/**
*
* @return string
*/
public function getTitle(): string {
return $this->title;
}
/**
*
* @return string
*/
public function getPathSegment(): string {
return $this->pathSegment;
}
/**
*
* @return null|Marker
*/
public function getRelMarker(): ?Marker {
if ($this->relMarker instanceof LazyLoadingProxy) {
$this->relMarker = $this->relMarker->_loadRealInstance();
}
return $this->relMarker;
}
/**
*
* @param Marker $relMarker
* @return void
*/
public function setRelMarker(?Marker $relMarker): void {
$this->relMarker = $relMarker;
}
/**
*
* @return null|FileReference
*/
public function getImage(): ?FileReference {
if ($this->image instanceof LazyLoadingProxy) {
$this->image = $this->image->_loadRealInstance();
}
return $this->image;
}
/**
*
* @param float $latitude
* @return void
*/
public function setLatitude(float $latitude): void {
$this->latitude = $latitude;
}
/**
*
* @param float $longitude
* @return void
*/
public function setLongitude(float $longitude): void {
$this->longitude = $longitude;
}
/**
*
* @param string $title
* @return void
*/
public function setTitle(string $title): void {
$this->title = $title;
}
/**
*
* @param string $pathSegment
* @return void
*/
public function setPathSegment(string $pathSegment): void {
$this->pathSegment = $pathSegment;
}
/**
*
* @param null|FileReference $image
* @return void
*/
public function setImage(?FileReference $image): void {
$this->image = $image;
}
/**
*
* @return string
*/
public function getPopupContent(): string {
return $this->popupContent;
}
/**
*
* @param string $popupContent
* @return void
*/
public function setPopupContent(string $popupContent): void {
$this->popupContent = $popupContent;
}
public function getAddressline(): string {
return $this->addressline;
}
public function getZip(): string {
return $this->zip;
}
public function getCity(): string {
return $this->city;
}
public function getRegion(): string {
return $this->region;
}
public function setAddressline(string $addressline): void {
$this->addressline = $addressline;
}
public function setZip(string $zip): void {
$this->zip = $zip;
}
public function setCity(string $city): void {
$this->city = $city;
}
public function setRegion(string $region): void {
$this->region = $region;
}
public function getNavToUrl(): string {
return $this->navToUrl;
}
public function setNavToUrl(string $navToUrl): void {
$this->navToUrl = $navToUrl;
}
}

56
Classes/Domain/Model/Marker.php Executable file
View File

@ -0,0 +1,56 @@
<?php
declare(strict_types=1);
namespace A2G\A2gMaps\Domain\Model;
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
use TYPO3\CMS\Extbase\Domain\Model\FileReference;
use TYPO3\CMS\Extbase\Annotation\ORM\{
Cascade,
Lazy
};
use TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy;
/**
* This file is part of the "altogether Products" Extension for TYPO3 CMS.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* (c) 2021 Raphael Martin <raphy.martin@gmail.com>, none
*/
/**
* Marker
*/
class Marker extends AbstractEntity {
/**
* mapIcon
*
* @var FileReference
* @Cascade("remove")
* @Lazy
*/
protected $mapIcon = null;
/**
*
* @return null|FileReference
*/
public function getMapIcon(): ?FileReference {
if ($this->mapIcon instanceof LazyLoadingProxy) {
$this->mapIcon = $this->mapIcon->_loadRealInstance();
}
return $this->mapIcon;
}
/**
*
* @return string
*/
public function getMapConfig(): string {
return $this->mapConfig;
}
}

View File

@ -0,0 +1,18 @@
<?php
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Scripting/PHPClass.php to edit this template
*/
namespace A2G\A2gMaps\Domain\Model;
use TYPO3\CMS\Extbase\Domain\Model\FileReference;
/**
* Description of SysFileReference
*
* @author raphael
*/
class SysFileReference extends FileReference {
//put your code here
}

View File

@ -0,0 +1,79 @@
<?php
declare(strict_types=1);
namespace A2G\A2gMaps\Domain\Repository;
use TYPO3\CMS\Core\Utility\MathUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Persistence\QueryInterface;
/**
* This file is part of the "Products" Extension for TYPO3 CMS.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* (c) 2021 Raphael Martin <raphy.martin@gmail.com>, none
*/
/**
* The repository for MapEntry
*/
class MapEntryRepository extends \TYPO3\CMS\Extbase\Persistence\Repository {
/**
* @var array
*/
// protected $defaultOrderings = [
// 'sorting' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING
// ];
public function initializeObject() {
$querySettings = $this->objectManager->get(\TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::class);
$querySettings->setRespectStoragePage(false);
$this->setDefaultQuerySettings($querySettings);
}
static private function mapInt($value){
if(MathUtility::canBeInterpretedAsInteger($value)){
return (int)$value;
} else {
return null;
}
}
public function getFromUids(array $uids, ?string $orderBy = null){
$arguments = [];
$uidsFiltered = array_filter(array_map('self::mapInt', $uids));
if(count($uidsFiltered) === 0){
return null;
}
$query = $this->createQuery();
$sql = 'SELECT meT.* FROM tx_a2gmaps_domain_model_mapentry AS meT ';
$sqlWhere = 'WHERE meT.hidden=0 AND meT.deleted=0 AND meT.uid IN ('.implode(',', $uidsFiltered).')';
$query->statement($sql . $sqlWhere, $arguments);
return $query->execute();
}
public function getEntriesFromMap(int $ttContentUid){
$query = $this->createQuery();
$sql = 'SELECT tcT.* FROM tt_content AS tcT ';
$sqlWhere = 'WHERE tcT.hidden=0 AND tcT.deleted=0 AND tcT.uid = :dcUid ';
$arguments = [
':dcUid' => $ttContentUid
];
$query->statement($sql . $sqlWhere, $arguments);
return explode(',',GeneralUtility::xml2array($query->execute(1)[0]['pi_flexform'])['data']['sDEF']['lDEF']['settings.markers']['vDEF']);
}
}

View File

@ -0,0 +1,37 @@
<?php
declare(strict_types=1);
namespace A2G\A2gMaps\Domain\Repository;
use TYPO3\CMS\Core\Utility\MathUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;
/**
* This file is part of the "Products" Extension for TYPO3 CMS.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* (c) 2021 Raphael Martin <raphy.martin@gmail.com>, none
*/
/**
* The repository for Marker
*/
class MarkerRepository extends \TYPO3\CMS\Extbase\Persistence\Repository {
/**
* @var array
*/
// protected $defaultOrderings = [
// 'sorting' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING
// ];
public function initializeObject() {
$querySettings = $this->objectManager->get(\TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::class);
$querySettings->setRespectStoragePage(false);
$this->setDefaultQuerySettings($querySettings);
}
}

View File

@ -0,0 +1,46 @@
<?php
declare(strict_types=1);
namespace A2G\A2gMaps\Domain\Repository;
/**
* This file is part of the "Products" Extension for TYPO3 CMS.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* (c) 2021 Raphael Martin <raphy.martin@gmail.com>, none
*/
/**
* The repository for SysFileReference
*/
class SysFileReferenceRepository extends \TYPO3\CMS\Extbase\Persistence\Repository {
/**
* @var array
*/
// protected $defaultOrderings = [
// 'sorting' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING
// ];
public function initializeObject() {
$querySettings = $this->objectManager->get(\TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::class);
$querySettings->setRespectStoragePage(false);
$this->setDefaultQuerySettings($querySettings);
}
public function findByTablename(string $tableName, int $uid){
$query = $this->createQuery();
$sql = 'SELECT sfrT.* FROM sys_file_reference AS sfrT ';
$sqlWhere = 'WHERE sfrT.hidden=0 AND sfrT.deleted=0 AND sfrT.tablenames = :dcTablename AND sfrT.uid_foreign = :dcUid ';
$arguments = [
':dcTablename' => $tableName,
':dcUid' => $uid
];
$query->statement($sql . $sqlWhere, $arguments);
return $query->execute();
}
}

View File

@ -0,0 +1,35 @@
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
declare(strict_types=1);
namespace A2G\A2gMaps\Domain\Traits;
use TYPO3\CMS\Extbase\Service\ImageService;
/**
* Description of InjectImageServiceTrait
*
* @author Raphael Martin
*/
trait InjectImageServiceTrait {
/**
* imageService
*
* @var ImageService
*/
protected $imageService = null;
/**
* @param ImageService $imageService
*/
public function injectImageService(ImageService $imageService) {
$this->imageService = $imageService;
}
}

View File

@ -0,0 +1,27 @@
<?php
namespace A2G\A2gMaps\Domain\Traits;
use A2G\A2gMaps\Domain\Repository\MapEntryRepository;
/**y
* Description of InjectMapEntryRepositoryTrait
*
* @author Raphael Martin
*/
trait InjectMapEntryRepositoryTrait {
/**
*
* @var MapEntryRepository
*/
protected $mapEntryRepository = null;
/**
* @param MapEntryRepository $mapEntryRepository
*/
public function injectMapEntryRepository(MapEntryRepository $mapEntryRepository) {
$this->mapEntryRepository = $mapEntryRepository;
}
}

View File

@ -0,0 +1,27 @@
<?php
namespace A2G\A2gMaps\Domain\Traits;
use A2G\A2gMaps\Domain\Repository\MarkerRepository;
/**y
* Description of InjectMarkerRepositoryTrait
*
* @author Raphael Martin
*/
trait InjectMarkerRepositoryTrait {
/**
*
* @var MarkerRepository
*/
protected $markerRepository = null;
/**
* @param MarkerRepository $markerRepository
*/
public function injectMarkerRepository(MarkerRepository $markerRepository) {
$this->markerRepository = $markerRepository;
}
}

View File

@ -0,0 +1,21 @@
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* declare(strict_types=1);
namespace A2G\A2gMaps\Domain\Traits;
use TYPO3\CMS\Extbase\Object\ObjectManager;
/**
* Description of InjectObjectManagerTrait
*
* @author Raphael Martin
*/

View File

@ -0,0 +1,27 @@
<?php
namespace A2G\A2gMaps\Domain\Traits;
use A2G\A2gMaps\Domain\Repository\SysFileReferenceRepository;
/**y
* Description of InjectSysFileReferenceRepositoryTrait
*
* @author Raphael Martin
*/
trait InjectSysFileReferenceRepositoryTrait {
/**
*
* @var SysFileReferenceRepository
*/
protected $sysFileReferenceRepository = null;
/**
* @param SysFileReferenceRepository $sysFileReferenceRepository
*/
public function injectSysFileReferenceRepository(SysFileReferenceRepository $sysFileReferenceRepository) {
$this->sysFileReferenceRepository = $sysFileReferenceRepository;
}
}

View File

@ -0,0 +1,70 @@
<?php
declare(strict_types = 1);
namespace A2G\A2gMaps\FormEngine\FieldControl;
/**
* This file is part of the "tt_address" Extension for TYPO3 CMS.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*/
use TYPO3\CMS\Backend\Form\AbstractNode;
use TYPO3\CMS\Core\Localization\LanguageService;
/**
* Adds a wizard for location selection via map
*/
class LocationMapWizard extends AbstractNode
{
/**
* @return array
*/
public function render(): array
{
$row = $this->data['databaseRow'];
$paramArray = $this->data['parameterArray'];
$resultArray = $this->initializeResultArray();
$nameLongitude = $paramArray['itemFormElName'];
$nameLatitude = str_replace('longitude', 'latitude', $nameLongitude);
$nameLatitudeActive = str_replace('data', 'control[active]', $nameLatitude);
$geoCodeUrl = $geoCodeUrlShort = '';
$gLat = '55.6760968';
$gLon = '12.5683371';
$lat = $row['latitude'] != 0 ? (string)$row['latitude'] : '0.0';
$lon = $row['longitude'] != 0 ? (string)$row['longitude'] : '0.0';
$resultArray['iconIdentifier'] = 'location-map-wizard';
$resultArray['title'] = $this->getLanguageService()->sL('LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address.locationMapWizard');
$resultArray['linkAttributes']['class'] = 'locationMapWizard ';
$resultArray['linkAttributes']['data-label-title'] = $this->getLanguageService()->sL('LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address.locationMapWizard');
$resultArray['linkAttributes']['data-label-close'] = $this->getLanguageService()->sL('LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address.locationMapWizard.close');
$resultArray['linkAttributes']['data-label-import'] = $this->getLanguageService()->sL('LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address.locationMapWizard.import');
$resultArray['linkAttributes']['data-lat'] = $lat;
$resultArray['linkAttributes']['data-lon'] = $lon;
$resultArray['linkAttributes']['data-glat'] = $gLat;
$resultArray['linkAttributes']['data-glon'] = $gLon;
$resultArray['linkAttributes']['data-geocodeurl'] = $geoCodeUrl;
$resultArray['linkAttributes']['data-geocodeurlshort'] = $geoCodeUrlShort;
$resultArray['linkAttributes']['data-namelat'] = htmlspecialchars($nameLatitude);
$resultArray['linkAttributes']['data-namelon'] = htmlspecialchars($nameLongitude);
$resultArray['linkAttributes']['data-namelat-active'] = htmlspecialchars($nameLatitudeActive);
$resultArray['linkAttributes']['data-tiles'] = htmlspecialchars('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png');
$resultArray['linkAttributes']['data-copy'] = '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors';
$resultArray['stylesheetFiles'][] = 'EXT:tt_address/Resources/Public/Contrib/leaflet-core-1.4.0.css';
$resultArray['stylesheetFiles'][] = 'EXT:tt_address/Resources/Public/Backend/LocationMapWizard/leafletBackend.css';
$resultArray['requireJsModules'][] = 'TYPO3/CMS/TtAddress/leaflet-core-1.4.0';
$resultArray['requireJsModules'][] = 'TYPO3/CMS/TtAddress/LeafletBackend';
return $resultArray;
}
/**
* @return LanguageService
*/
protected function getLanguageService(): LanguageService
{
return $GLOBALS['LANG'];
}
}

View File

@ -0,0 +1,39 @@
<?php
declare(strict_types=1);
namespace A2G\A2gMaps\Hooks;
use TYPO3\CMS\Core\DataHandling\DataHandler;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use A2G\A2gMaps\Utility\MapConfigUtility;
class MapEntryDataHandlerHooks {
/**
* @param string|int $id
*/
public function processDatamap_postProcessFieldArray(
string $status, // Status of the current operation, 'new' or 'update'
string $table, // The table currently processing data for
$id, // The record uid currently processing data for,
// [integer] or [string] (like 'NEW...')
array &$fieldArray, // The field array of a record, cleaned to only
// 'to-be-changed' values. Needs to be &$fieldArray to be considered reference.
DataHandler $dataHandler
): void
{
if ($table === 'tx_a2gmaps_domain_model_mapentry') {
if( ( $fieldArray['latitude'] === 0.0 || $fieldArray['longitude'] === 0.0 ) || $fieldArray['nav_to_url'] === ''){
if($fieldArray['nav_to_url'] === '' && ($fieldArray['latitude'] != 0.0 || $fieldArray['longitude'] != 0.0 )){
} else if($fieldArray['city'] !== '' && $fieldArray['zip'] !== '' && $fieldArray['addressline'] !== ''){
$latLon = MapConfigUtility::getLatLonFrom($fieldArray['addressline'], $fieldArray['zip'] === '' ? $fieldArray['city'] : $fieldArray['zip'].' '.$fieldArray['city']);
$fieldArray['latitude'] = (float)$latLon['lat'];
$fieldArray['longitude'] = (float)$latLon['lon'];
$fieldArray['nav_to_url'] = MapConfigUtility::getNavToLink($fieldArray['addressline'], $fieldArray['zip'] === '' ? $fieldArray['city'] : $fieldArray['zip'].' '.$fieldArray['city']);
}
}
}
}
}

View File

@ -0,0 +1,95 @@
<?php
declare(strict_types=1);
namespace A2G\A2gMaps\Utility;
/**
* This file is part of the "tt_address" Extension for TYPO3 CMS.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*/
/**
* Class EvalcoordinatesUtility
*/
class EvalcoordinatesUtility
{
const LATITUDE_UPPER = '90.00000000';
const LONGITUDE_UPPER = '180.00000000';
/**
* @param float $coordinate
* @return float evaluated and well-formed coordinate
*/
public static function formatLongitude(float $coordinate)
{
return self::validate((string)$coordinate, self::LONGITUDE_UPPER);
}
/**
* @param float $coordinate
* @return float evaluated and well-formed coordinate
*/
public static function formatLatitude(float $coordinate)
{
return self::validate((string)$coordinate, self::LATITUDE_UPPER);
}
/**
* @param string $coordinate
* @param string $upperRange
* @return string
*/
protected static function validate($coordinate, string $upperRange): string
{
if ($coordinate === '') {
return '.00000000';
}
// test if value is negative
$negative = '';
if ($coordinate[0] === '-') {
$negative = '-';
}
// remove all chars not being digits and point
// therefore we will get a number
$coordinate = preg_replace("/[^\d\.]/", '', $coordinate);
// split up string at first occurrence decimal point without losing data
$integerPart = strstr($coordinate, '.', true);
$decimalPart = strstr($coordinate, '.');
// if coordinate is given as integer (no decimal point)
if ($integerPart === false) {
$integerPart = $coordinate;
}
if ($decimalPart === false) {
$decimalPart = '00';
}
// remove all points from decimal-part
$decimalPart = preg_replace("/[^\d]/", '', $decimalPart);
// fill up with zeros or shorten to match our goal of decimal(latitude: 10,8 and longitude: 11,8) in DB
if (\strlen($decimalPart) >= 8) {
$decimalPart = substr($decimalPart, 0, 8);
} else {
$decimalPart = str_pad($decimalPart, 8, '0', STR_PAD_RIGHT);
}
// concatenate the whole string to a well-formed longitude and return
$coordinate = $integerPart . '.' . $decimalPart;
// test if value is in the possible range. longitude can be -180 to +180.
// latitude can be -90 to +90
// At this point, our minus, if there, is stored to 'negative'
// therefore we just test if integerpart is bigger than 90
if ($coordinate > $upperRange) {
$coordinate = $upperRange;
}
// reapply signed/unsigned and return
return $negative . $coordinate;
}
}

View File

@ -0,0 +1,386 @@
<?php
declare(strict_types=1);
namespace A2G\A2gMaps\Utility;
use TYPO3\CMS\Extbase\Annotation as Extbase;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder;
use TYPO3\CMS\Extbase\Object\ObjectManager;
use TYPO3\CMS\Extbase\Configuration\ConfigurationManager;
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
use A2G\A2gMaps\Domain\Model\MapEntry;
use GuzzleHttp\Client;
/**
* Description of Canonical
*
* @author Raphael Martin raphael@web-crossing.com
*/
class MapConfigUtility {
/**
* uidParamName
*
* @var string
*/
static private $mapLayerConfigs = [
1 => [
"layer" => "osm",
"config" => [
],
"label" => "osm_map_layer"
],
10 => [
"layer" => "stamen",
"config" => [
"layer" => "terrain"
],
"label" => "stamen_map_terrain"
],
11 => [
"layer" => "stamen",
"config" => [
"layer" => "watercolor"
],
"label" => "stamen_map_watercolor"
],
12 => [
"layer" => "stamen",
"config" => [
"layer" => "toner"
],
"label" => "stamen_map_toner"
],
100 => [
"layer" => "thunderforest",
"config" => [
"layer" => "cycle"
],
"label" => "thunderforest_map_cycle"
],
101 => [
"layer" => "thunderforest",
"config" => [
"layer" => "transport"
],
"label" => "thunderforest_map_transport"
],
102 => [
"layer" => "thunderforest",
"config" => [
"layer" => "landscape"
],
"label" => "thunderforest_map_landscape"
],
103 => [
"layer" => "thunderforest",
"config" => [
"layer" => "outdoors"
],
"label" => "thunderforest_map_outdoors"
],
104 => [
"layer" => "thunderforest",
"config" => [
"layer" => "atlas"
],
"label" => "thunderforest_map_atlas"
],
105 => [
"layer" => "thunderforest",
"config" => [
"layer" => "transport-dark"
],
"label" => "thunderforest_map_transport-dark"
],
106 => [
"layer" => "thunderforest",
"config" => [
"layer" => "spinal-map"
],
"label" => "thunderforest_map_spinal"
],
107 => [
"layer" => "thunderforest",
"config" => [
"layer" => "pioneer"
],
"label" => "thunderforest_map_pioneer"
],
108 => [
"layer" => "thunderforest",
"config" => [
"layer" => "neighbourhood"
],
"label" => "thunderforest_map_neighbourhood"
],
109 => [
"layer" => "thunderforest",
"config" => [
"layer" => "mobile-atlas"
],
"label" => "thunderforest_map_mobile-atlas"
],
200 => [
"layer" => "maptiler",
"config" => [
"layer" => "basic"
],
"label" => "maptiler_map_basic"
],
201 => [
"layer" => "maptiler",
"config" => [
"layer" => "basic-4326"
],
"label" => "maptiler_map_basic-4326"
],
202 => [
"layer" => "maptiler",
"config" => [
"layer" => "bright"
],
"label" => "maptiler_map_bright"
],
203 => [
"layer" => "maptiler",
"config" => [
"layer" => "openstreetmap"
],
"label" => "maptiler_map_openstreetmap"
],
204 => [
"layer" => "maptiler",
"config" => [
"layer" => "outdoor"
],
"label" => "maptiler_map_outdoor"
],
205 => [
"layer" => "maptiler",
"config" => [
"layer" => "pastel"
],
"label" => "maptiler_map_pastel"
],
206 => [
"layer" => "maptiler",
"config" => [
"layer" => "hybrid"
],
"label" => "maptiler_map_hybrid"
],
207 => [
"layer" => "maptiler",
"config" => [
"layer" => "streets"
],
"label" => "maptiler_map_streets"
],
208 => [
"layer" => "maptiler",
"config" => [
"layer" => "toner"
],
"label" => "maptiler_map_toner"
],
209 => [
"layer" => "maptiler",
"config" => [
"layer" => "topo"
],
"label" => "maptiler_map_topo"
],
210 => [
"layer" => "maptiler",
"config" => [
"layer" => "topographique"
],
"label" => "maptiler_map_topographique"
],
211 => [
"layer" => "maptiler",
"config" => [
"layer" => "voyager"
],
"label" => "maptiler_map_voyager"
],
212 => [
"layer" => "maptiler",
"config" => [
"layer" => "winter"
],
"label" => "maptiler_map_winter"
],
];
/**
* setCanonical
*
* @param type $href
*/
public static function getMapLayerConfig(array $mapLayerConfigIds) {
$out = [];
foreach ($mapLayerConfigIds as $id) {
$out[] = self::$mapLayerConfigs[$id];
}
return $out;
}
public static function getMapConfig(array $mapLayerConfigIds, ?string $gpxSource = null, ?string $markerSource = null,
?string $defaultMarkerIcon = null,
int $zoom = 1, int $maxZoom = 18, float $centerLon = 0.0, float $centerLat = 0.0,
bool $zoomSlider = false, bool $fullScreen = false, bool $useLayerSwitcher = false): array {
$out = [
'zoom' => $zoom,
'maxZoom' => $maxZoom,
'centerLon' => $centerLon,
'centerLat' => $centerLat
];
$out['mapLayers'] = self::getMapLayerConfig($mapLayerConfigIds);
if ($useLayerSwitcher) {
for ($i = 0; $i < count($out['mapLayers']); $i++) {
$out['mapLayers'][$i]['active'] = true;
}
}
if ($defaultMarkerIcon !== null) {
$out['defaultMarkerIcon'] = $defaultMarkerIcon;
}
if ($gpxSource !== null) {
$out['gpxSource'] = $gpxSource;
}
if ($markerSource !== null) {
$out['markerSource'] = $markerSource;
}
if ($zoomSlider) {
$out['zoomSlider'] = $zoomSlider;
}
if ($fullScreen) {
$out['fullScreen'] = $fullScreen;
}
return $out;
}
static public function getMarkerCsr() {
return [
"type" => "name",
"properties" => [
"name" => "urn:ogc:def:crs:EPSG::4326"
]
];
}
static public function getMarker(MapEntry $marker, ?string $icon, ?string $popupContent) {
$out = [
"type" => "Feature",
"id" => $marker->getUid(),
"geometry" => [
"type" => "Point",
"coordinates" => [
$marker->getLongitude(),
$marker->getLatitude()
]
],
"geometry_name" => "SHAPE",
"properties" => [
'icon' => $icon
]
];
if ($popupContent !== null) {
$out['properties']['popup'] = $popupContent;
}
return $out;
}
static private $countryCoordinates = null;
private static function getCountryGeoJson(string $twoIsoCode = ''): ?array {
if (self::$countryCoordinates === null) {
self::$countryCoordinates = \GuzzleHttp\json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . '/typo3conf/ext/a2g_travel_blog/Resources/Public/sampleData/countries.json'), true);
}
if (self::$countryCoordinates[strtoupper($twoIsoCode)]) {
return self::$countryCoordinates[strtoupper($twoIsoCode)][0];
} else {
return null;
}
}
static protected $nominationBaseUrl = 'https://nominatim.openstreetmap.org';
static protected $nominationSufixUrl = '&format=json&polygon=1&addressdetails=1';
static protected $client = null;
static protected function initClient(){
if(self::$client===null){
self::$client = new Client([
// Base URI is used with relative requests
'base_uri' => self::$nominationBaseUrl,
// You can set any number of default request options.
'timeout' => 2.0,
]);
}
}
static public function getLatLonFrom(string $addressline, string $countryline, string $state = ''): ?array {
self::initClient();
if ($state === '') {
$url = urlencode($addressline . ',' . $countryline);
} else {
$url = urlencode($addressline . ',' . $countryline . ',' . $state);
}
$response = self::$client->request('GET', self::$nominationBaseUrl.'/search?q='.$url.self::$nominationSufixUrl);
if($response->getStatusCode() === 200){
return \GuzzleHttp\json_decode($response->getBody()->getContents(), true)[0];
}
return null;
}
public static function getNavToLink(string $addressline, string $countryline, string $state = ''): string{
if ($state === '') {
$url = str_replace(' ', '+', $addressline . ',' . $countryline);
} else {
$url = str_replace(' ', '+', $addressline . ',' . $countryline . ',' . $state);
}
return 'https://www.google.com/maps/dir//'. urlencode($url);
}
public static function getCountryFeatureCollectionsFromIsoCodeList(array $isoCodes = ['DE' => 'popupcontent de', 'AT' => 'popupcontent at']) {
$out = [
'type' => 'FeatureCollection',
'crs' => [
'type' => 'name',
'properties' => [
'name' => 'urn:ogc:def:crs:OGC:1.3:CRS84'
]
],
'features' => []
];
foreach ($isoCodes as $twoIsoCode => $isoCodePopupcontent) {
if ($isoCodePopupcontent === null) {
$out['features'][] = [
'type' => 'Feature',
'properties' => [
],
'geometry' => self::getCountryGeoJson($twoIsoCode)
];
} else {
$out['features'][] = [
'type' => 'Feature',
'properties' => [
'popup' => $isoCodePopupcontent
],
'geometry' => self::getCountryGeoJson($twoIsoCode)
];
}
}
return $out;
}
}

2
Configuration/.htaccess Executable file
View File

@ -0,0 +1,2 @@
Order deny,allow
Deny from all

View File

@ -0,0 +1,9 @@
<?php
declare(strict_types=1);
return [
A2G\A2gMaps\Domain\Model\SysFileReference::class => [
'tableName' => 'sys_file_reference',
]
];

View File

@ -0,0 +1,427 @@
<T3DataStructure>
<sheets>
<sDEF>
<ROOT>
<TCEforms>
<sheetTitle>Function</sheetTitle>
</TCEforms>
<type>array</type>
<el>
<settings.markers>
<label>LLL:EXT:a2g_maps/Resources/Private/Language/backend.xlf:flexform_map.markers</label>
<config>
<type>group</type>
<allowed>tx_a2gmaps_domain_model_mapentry</allowed>
<fieldControl>
<editPopup>
<disabled>false</disabled>
</editPopup>
<addRecord>
<disabled>false</disabled>
</addRecord>
<listModule>
<disabled>false</disabled>
</listModule>
</fieldControl>
</config>
</settings.markers>
<settings.layers>
<label>LLL:EXT:a2g_maps/Resources/Private/Language/backend.xlf:flexform_map.selectable_layers</label>
<description>LLL:EXT:a2g_maps/Resources/Private/Language/backend.xlf:flexform_map.selectable_layers_description</description>
<config>
<type>select</type>
<renderType>selectMultipleSideBySide</renderType>
<items type="array">
<numIndex index="0" type="array">
<numIndex index="0">osm</numIndex>
<numIndex index="1">1</numIndex>
</numIndex>
<numIndex index="1" type="array">
<numIndex index="0">stamen terrain</numIndex>
<numIndex index="1">10</numIndex>
</numIndex>
<numIndex index="2" type="array">
<numIndex index="0">stamen watercolor</numIndex>
<numIndex index="1">11</numIndex>
</numIndex>
<numIndex index="3" type="array">
<numIndex index="0">stamen toner</numIndex>
<numIndex index="1">12</numIndex>
</numIndex>
<!-- <numIndex index="4" type="array">
<numIndex index="0">thunderfores openCycleMap</numIndex>
<numIndex index="1">100</numIndex>
</numIndex>
<numIndex index="5" type="array">
<numIndex index="0">thunderfores transport</numIndex>
<numIndex index="1">101</numIndex>
</numIndex>
<numIndex index="6" type="array">
<numIndex index="0">thunderfores landscape</numIndex>
<numIndex index="1">102</numIndex>
</numIndex>
<numIndex index="7" type="array">
<numIndex index="0">thunderfores outdoors</numIndex>
<numIndex index="1">103</numIndex>
</numIndex>
<numIndex index="8" type="array">
<numIndex index="0">thunderfores atlas</numIndex>
<numIndex index="1">104</numIndex>
</numIndex>
<numIndex index="9" type="array">
<numIndex index="0">thunderfores transport-dark</numIndex>
<numIndex index="1">105</numIndex>
</numIndex>
<numIndex index="10" type="array">
<numIndex index="0">thunderfores spinal-map</numIndex>
<numIndex index="1">106</numIndex>
</numIndex>
<numIndex index="11" type="array">
<numIndex index="0">thunderfores pioneer</numIndex>
<numIndex index="1">107</numIndex>
</numIndex>
<numIndex index="12" type="array">
<numIndex index="0">thunderfores neighbourhout</numIndex>
<numIndex index="1">108</numIndex>
</numIndex>
<numIndex index="13" type="array">
<numIndex index="0">thunderfores mobile-atlas</numIndex>
<numIndex index="1">109</numIndex>
</numIndex>
<numIndex index="14" type="array">
<numIndex index="0">maptiler basic</numIndex>
<numIndex index="1">200</numIndex>
</numIndex>
<numIndex index="15" type="array">
<numIndex index="0">maptiler basic (EPSG:4326)</numIndex>
<numIndex index="1">201</numIndex>
</numIndex>
<numIndex index="16" type="array">
<numIndex index="0">maptiler bright</numIndex>
<numIndex index="1">202</numIndex>
</numIndex>
<numIndex index="17" type="array">
<numIndex index="0">maptiler openstreetmap</numIndex>
<numIndex index="1">203</numIndex>
</numIndex>
<numIndex index="18" type="array">
<numIndex index="0">maptiler outdoor</numIndex>
<numIndex index="1">204</numIndex>
</numIndex>
<numIndex index="19" type="array">
<numIndex index="0">maptiler pastel</numIndex>
<numIndex index="1">205</numIndex>
</numIndex>
<numIndex index="20" type="array">
<numIndex index="0">maptiler satelit hybrid</numIndex>
<numIndex index="1">206</numIndex>
</numIndex>
<numIndex index="21" type="array">
<numIndex index="0">maptiler streets</numIndex>
<numIndex index="1">207</numIndex>
</numIndex>
<numIndex index="22" type="array">
<numIndex index="0">maptiler toner</numIndex>
<numIndex index="1">208</numIndex>
</numIndex>
<numIndex index="23" type="array">
<numIndex index="0">maptiler topo</numIndex>
<numIndex index="1">209</numIndex>
</numIndex>
<numIndex index="24" type="array">
<numIndex index="0">maptiler topographique</numIndex>
<numIndex index="1">210</numIndex>
</numIndex>
<numIndex index="25" type="array">
<numIndex index="0">maptiler voyager</numIndex>
<numIndex index="1">211</numIndex>
</numIndex>
<numIndex index="26" type="array">
<numIndex index="0">maptiler winter</numIndex>
<numIndex index="1">212</numIndex>
</numIndex> -->
</items>
<minitems>1</minitems>
</config>
</settings.layers>
<settings.controllsPositions>
<label>LLL:EXT:a2g_maps/Resources/Private/Language/backend.xlf:flexform_map.position_from_map_controll_stuff</label>
<config>
<type>select</type>
<renderType>selectSingle</renderType>
<items type="array">
<numIndex index="0" type="array">
<numIndex index="0">LLL:EXT:a2g_maps/Resources/Private/Language/backend.xlf:flexform_map.hide</numIndex>
<numIndex index="1">0</numIndex>
</numIndex>
<numIndex index="1" type="array">
<numIndex index="0">LLL:EXT:a2g_maps/Resources/Private/Language/backend.xlf:flexform_map.top</numIndex>
<numIndex index="1">1</numIndex>
</numIndex>
<numIndex index="2" type="array">
<numIndex index="0">LLL:EXT:a2g_maps/Resources/Private/Language/backend.xlf:flexform_map.bottom</numIndex>
<numIndex index="1">2</numIndex>
</numIndex>
<numIndex index="3" type="array">
<numIndex index="0">LLL:EXT:a2g_maps/Resources/Private/Language/backend.xlf:flexform_map.both</numIndex>
<numIndex index="1">3</numIndex>
</numIndex>
</items>
</config>
</settings.controllsPositions>
<settings.showMarkerList>
<label>LLL:EXT:a2g_maps/Resources/Private/Language/backend.xlf:flexform_map.show_marker_list</label>
<config>
<type>check</type>
<items type="array">
<numIndex index="0" type="array">
<numIndex index="0">LLL:EXT:a2g_maps/Resources/Private/Language/backend.xlf:flexform_map.yes</numIndex>
<numIndex index="1">1</numIndex>
</numIndex>
</items>
</config>
<onChange>reload</onChange>
</settings.showMarkerList>
<settings.markerListOrderBy>
<label>LLL:EXT:a2g_maps/Resources/Private/Language/backend.xlf:flexform_map.order_marker_list_by</label>
<config>
<type>select</type>
<renderType>selectMultipleSideBySide</renderType>
<items type="array">
<numIndex index="0" type="array">
<numIndex index="0">LLL:EXT:a2g_maps/Resources/Private/Language/backend.xlf:flexform_map.none</numIndex>
<numIndex index="1"></numIndex>
</numIndex>
<numIndex index="1" type="array">
<numIndex index="0">LLL:EXT:a2g_maps/Resources/Private/Language/backend.xlf:flexform_map.region_state</numIndex>
<numIndex index="1">region</numIndex>
</numIndex>
</items>
</config>
<displayCond>FIELD:settings.showMarkerList:=:1</displayCond>
</settings.markerListOrderBy>
<settings.useLayerSwitcher>
<label>LLL:EXT:a2g_maps/Resources/Private/Language/backend.xlf:flexform_map.use_layer_switcher</label>
<config>
<type>check</type>
<items type="array">
<numIndex index="0" type="array">
<numIndex index="0">LLL:EXT:a2g_maps/Resources/Private/Language/backend.xlf:flexform_map.yes</numIndex>
<numIndex index="1">1</numIndex>
</numIndex>
</items>
</config>
<onChange>reload</onChange>
</settings.useLayerSwitcher>
<settings.layerSwitcherValue>
<label>LLL:EXT:a2g_maps/Resources/Private/Language/backend.xlf:flexform_map.layer_switcher_init_value</label>
<config>
<type>input</type>
<eval>trim,int</eval>
<size>3</size>
</config>
<displayCond>FIELD:settings.useLayerSwitcher:=:1</displayCond>
</settings.layerSwitcherValue>
<settings.zoom>
<label>LLL:EXT:a2g_maps/Resources/Private/Language/backend.xlf:flexform_map.map_zoom</label>
<config>
<type>input</type>
<eval>trim,int</eval>
<size>2</size>
<range type="array">
<lower>1</lower>
<upper>18</upper>
</range>
<default>2</default>
<slider>
<step>1</step>
<width>200</width>
</slider>
</config>
</settings.zoom>
<settings.maxZoom>
<label>LLL:EXT:a2g_maps/Resources/Private/Language/backend.xlf:flexform_map.map_max_zoom</label>
<config>
<type>input</type>
<eval>trim,int</eval>
<size>2</size>
<range type="array">
<lower>1</lower>
<upper>18</upper>
</range>
<default>18</default>
<slider>
<step>1</step>
<width>200</width>
</slider>
</config>
</settings.maxZoom>
<settings.centerLat>
<label>LLL:EXT:a2g_maps/Resources/Private/Language/backend.xlf:flexform_map.center_lat</label>
<config>
<type>input</type>
<eval>trim,float</eval>
<size>11</size>
<default>0</default>
<range type="array">
<lower>-90</lower>
<upper>90</upper>
</range>
</config>
</settings.centerLat>
<settings.centerLon>
<label>LLL:EXT:a2g_maps/Resources/Private/Language/backend.xlf:flexform_map.center_lon</label>
<config>
<type>input</type>
<eval>trim,float</eval>
<size>11</size>
<default>0</default>
<range type="array">
<lower>-90</lower>
<upper>90</upper>
</range>
</config>
</settings.centerLon>
<settings.showLayerSelect>
<label>LLL:EXT:a2g_maps/Resources/Private/Language/backend.xlf:flexform_map.show_layer_select</label>
<config>
<type>check</type>
<items type="array">
<numIndex index="0" type="array">
<numIndex index="0">LLL:EXT:a2g_maps/Resources/Private/Language/backend.xlf:flexform_map.yes</numIndex>
<numIndex index="1">1</numIndex>
</numIndex>
</items>
</config>
</settings.showLayerSelect>
<settings.showMyPositionButton>
<label>LLL:EXT:a2g_maps/Resources/Private/Language/backend.xlf:flexform_map.show_my_position_btn</label>
<config>
<type>check</type>
<items type="array">
<numIndex index="0" type="array">
<numIndex index="0">LLL:EXT:a2g_maps/Resources/Private/Language/backend.xlf:flexform_map.yes</numIndex>
<numIndex index="1">1</numIndex>
</numIndex>
</items>
</config>
</settings.showMyPositionButton>
<settings.showRemoveMarkerButton>
<label>LLL:EXT:a2g_maps/Resources/Private/Language/backend.xlf:flexform_map.show_remove_marker_btn</label>
<config>
<type>check</type>
<items type="array">
<numIndex index="0" type="array">
<numIndex index="0">LLL:EXT:a2g_maps/Resources/Private/Language/backend.xlf:flexform_map.yes</numIndex>
<numIndex index="1">1</numIndex>
</numIndex>
</items>
</config>
</settings.showRemoveMarkerButton>
<settings.useFullscreenButton>
<label>LLL:EXT:a2g_maps/Resources/Private/Language/backend.xlf:flexform_map.show_fullscreen_btn</label>
<config>
<type>check</type>
<items type="array">
<numIndex index="0" type="array">
<numIndex index="0">LLL:EXT:a2g_maps/Resources/Private/Language/backend.xlf:flexform_map.yes</numIndex>
<numIndex index="1">1</numIndex>
</numIndex>
</items>
</config>
</settings.useFullscreenButton>
<settings.useZoomSlider>
<label>LLL:EXT:a2g_maps/Resources/Private/Language/backend.xlf:flexform_map.show_zoom_slider</label>
<config>
<type>check</type>
<items type="array">
<numIndex index="0" type="array">
<numIndex index="0">LLL:EXT:a2g_maps/Resources/Private/Language/backend.xlf:flexform_map.yes</numIndex>
<numIndex index="1">1</numIndex>
</numIndex>
</items>
</config>
</settings.useZoomSlider>
<settings.gpxData>
<label>LLL:EXT:a2g_maps/Resources/Private/Language/backend.xlf:flexform_map.gpx_data</label>
<config>
<type>inline</type>
<maxitems>1</maxitems>
<foreign_table>sys_file_reference</foreign_table>
<foreign_table_field>tablenames</foreign_table_field>
<foreign_label>uid_local</foreign_label>
<foreign_sortby>sorting_foreign</foreign_sortby>
<foreign_field>uid_foreign</foreign_field>
<foreign_selector>uid_local</foreign_selector>
<foreign_selector_fieldTcaOverride>
<config>
<appearance>
<elementBrowserType>file</elementBrowserType>
<elementBrowserAllowed>gpx</elementBrowserAllowed>
</appearance>
</config>
</foreign_selector_fieldTcaOverride>
<foreign_types type="array">
<numIndex index="0">
<showitem>--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,--palette--;;filePalette</showitem>
</numIndex>
<numIndex index="2">
<showitem>--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,--palette--;;filePalette</showitem>
</numIndex>
</foreign_types>
<foreign_match_fields>
<fieldname>image</fieldname> <!-- CAUTION!! Replace "fal" with the variable name of this field! -->
</foreign_match_fields>
<appearance type="array">
<newRecordLinkAddTitle>1</newRecordLinkAddTitle>
<headerThumbnail>
<field>uid_local</field>
<height>64</height>
<width>64</width>
</headerThumbnail>
<enabledControls>
<info>1</info>
<new>0</new>
<dragdrop>0</dragdrop>
<sort>1</sort>
<hide>0</hide>
<delete>1</delete>
<localize>1</localize>
</enabledControls>
<createNewRelationLinkTitle>LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference</createNewRelationLinkTitle>
</appearance>
<behaviour>
<localizationMode>select</localizationMode>
<localizeChildrenAtParentLocalization>1</localizeChildrenAtParentLocalization>
</behaviour>
<overrideChildTca>
<columns type="array">
<uid_local type="array">
<config type="array">
<appearance type="array">
<elementBrowserType>file</elementBrowserType>
<elementBrowserAllowed>gpx</elementBrowserAllowed>
</appearance>
</config>
</uid_local>
</columns>
<types type="array">
<numIndex index="2">
<showitem>--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,--palette--;;filePalette</showitem>
</numIndex>
</types>
</overrideChildTca>
</config>
</settings.gpxData>
</el>
</ROOT>
</sDEF>
</sheets>
</T3DataStructure>

5
Configuration/Services.yml Executable file
View File

@ -0,0 +1,5 @@
services:
_defaults:
autowire: true
autoconfigure: true
public: false

View File

@ -0,0 +1,21 @@
<?php
defined('TYPO3_MODE') || die();
/***************
* TypoScript: Full Package
* This includes the full setup including all configurations
*/
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile(
'a2g_maps',
'Configuration/TypoScript',
'Altogether Maps: Full Package'
);
/***************
* TypoScript: Base Package
*/
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile(
'a2g_maps',
'Configuration/TypoScript/Base',
'Altogether Maps: Base Package'
);

View File

@ -0,0 +1,35 @@
<?php
defined('TYPO3_MODE') || die();
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
'A2gMaps',
'map',
'Map'
);
$pluginSignature = 'a2gmaps_map';
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist'][$pluginSignature]='pages,layout,select_key,recursive';
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist'][$pluginSignature]='pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
$pluginSignature,
'FILE:EXT:a2g_maps/Configuration/FlexForms/flexform_map.xml'
);
/**
* typo3 12
*
$pluginSignature = \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
'A2gMaps',
'map',
'Map'
);
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist'][$pluginSignature]
= 'pi_flexform';
ExtensionManagementUtility::addPiFlexFormValue(
$pluginSignature,
'FILE:EXT:a2g_maps/Configuration/FlexForms/flexform_map.xml'
);
*/

View File

@ -0,0 +1,397 @@
<?php
return [
'ctrl' => [
'label' => 'title',
'label_alt' => 'title,latitude,longitude',
'label_alt_force' => false,
// 'label_userFunc' => \FriendsOfTYPO3\TtAddress\Hooks\Tca\Label::class . '->getAddressLabel',
'languageField' => 'sys_language_uid',
'transOrigDiffSourceField' => 'l10n_diffsource',
'sortby' => 'sorting',
'default_sortby' => 'ORDER BY crdate',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
'prependAtCopy' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.prependAtCopy',
'delete' => 'deleted',
'title' => 'LLL:EXT:a2g_maps/Resources/Private/Language/locallang_db.xlf:a2g_maps',
'versioningWS' => true,
'origUid' => 't3_origuid',
'thumbnail' => 'image',
'enablecolumns' => [
'disabled' => 'hidden',
'starttime' => 'starttime',
'endtime' => 'endtime',
'fe_group' => 'fe_group',
],
'iconfile' => 'EXT:a2g_maps/Resources/Public/Icons/map.png'
],
'columns' => [
'pid' => [
'label' => 'pid',
'config' => [
'type' => 'passthrough'
]
],
'crdate' => [
'label' => 'crdate',
'config' => [
'type' => 'input',
'renderType' => 'inputDateTime',
'eval' => 'datetime'
]
],
'cruser_id' => [
'label' => 'cruser_id',
'config' => [
'type' => 'passthrough'
]
],
'tstamp' => [
'label' => 'tstamp',
'config' => [
'type' => 'input',
'renderType' => 'inputDateTime',
'eval' => 'datetime'
]
],
'hidden' => [
'exclude' => true,
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.hidden',
'config' => [
'type' => 'check'
]
],
'starttime' => [
'exclude' => true,
'label' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:starttime_formlabel',
'config' => [
'type' => 'input',
'renderType' => 'inputDateTime',
'size' => 16,
'eval' => 'datetime,int',
'default' => 0,
'behaviour' => [
'allowLanguageSynchronization' => true,
],
]
],
'endtime' => [
'exclude' => true,
'label' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:endtime_formlabel',
'config' => [
'type' => 'input',
'renderType' => 'inputDateTime',
'size' => 16,
'eval' => 'datetime,int',
'default' => 0,
'behaviour' => [
'allowLanguageSynchronization' => true,
],
]
],
'fe_group' => [
'exclude' => true,
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.fe_group',
'config' => [
'type' => 'select',
'renderType' => 'selectMultipleSideBySide',
'size' => 5,
'maxitems' => 20,
'items' => [
[
'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.hide_at_login',
-1,
],
[
'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.any_login',
-2,
],
[
'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.usergroups',
'--div--',
],
],
'exclusiveKeys' => '-1,-2',
'foreign_table' => 'fe_groups',
'foreign_table_where' => 'ORDER BY fe_groups.title',
],
],
'sys_language_uid' => [
'exclude' => true,
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
'config' => [
'type' => 'language'
]
],
'l10n_diffsource' => [
'config' => [
'type' => 'passthrough',
'default' => ''
]
],
'title' => [
'exclude' => true,
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.title_person',
'config' => [
'type' => 'input',
'size' => 8,
'eval' => 'trim',
'max' => 255,
'behaviour' => [
'allowLanguageSynchronization' => true,
],
]
],
'path_segment' => [
'exclude' => true,
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:pages.slug',
'displayCond' => 'VERSION:IS:false',
'config' => [
'type' => 'slug',
'size' => 50,
'generatorOptions' => [
'fields' => ['title'],
'fieldSeparator' => '-',
'replacements' => [
'/' => '-'
],
],
'fallbackCharacter' => '-',
'eval' => 'unique',
'default' => ''
]
],
'city' => [
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.city',
'config' => [
'type' => 'input',
'size' => 20,
'eval' => 'trim',
'max' => 255,
'behaviour' => [
'allowLanguageSynchronization' => true,
],
]
],
'addressline' => [
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.address',
'config' => [
'type' => 'input',
'eval' => 'trim',
'size' => 50,
'max' => 80,
'behaviour' => [
'allowLanguageSynchronization' => true,
],
]
],
'zip' => [
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.zip',
'config' => [
'type' => 'input',
'eval' => 'trim',
'size' => 10,
'max' => 20,
'behaviour' => [
'allowLanguageSynchronization' => true,
],
]
],
'region' => [
'exclude' => true,
'label' => 'LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address.region',
'config' => [
'type' => 'input',
'size' => 10,
'eval' => 'trim',
'max' => 255,
'behaviour' => [
'allowLanguageSynchronization' => true,
],
]
],
'country' => [
'exclude' => true,
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.country',
'config' => [
'type' => 'input',
'size' => 20,
'eval' => 'trim',
'max' => 128,
'behaviour' => [
'allowLanguageSynchronization' => true,
],
]
],
'latitude' => [
'exclude' => true,
'label' => 'LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address.latitude',
'config' => [
'type' => 'input',
'eval' => \FriendsOfTYPO3\TtAddress\Evaluation\LatitudeEvaluation::class,
'default' => null,
'behaviour' => [
'allowLanguageSynchronization' => true,
],
]
],
'longitude' => [
'exclude' => true,
'label' => 'LLL:EXT:tt_address/Resources/Private/Language/locallang_db.xlf:tt_address.longitude',
'config' => [
'type' => 'input',
'eval' => \FriendsOfTYPO3\TtAddress\Evaluation\LongitudeEvaluation::class,
'default' => null,
'fieldControl' => [
'locationMap' => [
'renderType' => 'locationMapWizard'
]
],
'behaviour' => [
'allowLanguageSynchronization' => true,
],
]
],
'image' => [
'exclude' => true,
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:image',
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
'image',
[
'appearance' => [
'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference'
],
'overrideChildTca' => [
'types' => [
\TYPO3\CMS\Core\Resource\File::FILETYPE_UNKNOWN => [
'showitem' => '
--palette--;;filePalette
'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => [
'showitem' => '
--palette--;;filePalette
'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
'showitem' => '
title,
description,
alternative,
crop,
--palette--;;filePalette
'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => [
'showitem' => '
--palette--;;filePalette
'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => [
'showitem' => '
--palette--;;filePalette
'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => [
'showitem' => '
--palette--;;filePalette
'
],
],
],
'minitems' => 0,
'maxitems' => 1,
],
$GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
),
],
'popup_content' => [
'exclude' => true,
'label' => 'LLL:EXT:a2g_maps/Resources/Private/Language/locallang_db.xlf:popup_content',
'config' => [
'type' => 'text',
'enableRichtext' => true,
'fieldControl' => [
'fullScreenRichtext' => [
'disabled' => false,
],
],
],
],
'nav_to_url' => [
'exclude' => true,
'label' => 'LLL:EXT:a2g_maps/Resources/Private/Language/locallang_db.xlf:nav_to_url',
'config' => [
'type' => 'input',
'size' => 200,
'eval' => 'trim',
'max' => 1000,
'behaviour' => [
'allowLanguageSynchronization' => true,
],
]
],
'rel_marker' => [
'exclude' => true,
'label' => 'LLL:EXT:a2g_maps/Resources/Private/Language/locallang_db.xlf:rel_marker',
'config' => [
'type' => 'select',
'renderType' => 'selectMultipleSideBySide',
'foreign_table' => 'tx_a2gmaps_domain_model_marker',
'foreign_field' => 'rel_map_entry',
'size' => 5,
'minitems' => 0,
'maxitems' => 1,
'autoSizeMax' => 20,
'fieldControl' => [
'editPopup' => [
'disabled' => false,
'options' => [
'windowOpenParameters' => 'height=300,width=500,status=0,menubar=0,scrollbars=1',
],
],
'addRecord' => [
'disabled' => false,
],
'listModule' => [
'disabled' => false,
],
],
],
]
],
'types' => [
'0' => [
'showitem' => '
--palette--;LLL:EXT:a2g_maps/Resources/Private/Language/locallang_db.xlf:palette.general;general,
--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:language,
--palette--;;language,
--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:access,
--palette--;;paletteHidden,
--palette--;;paletteAccess,
'
]
],
'palettes' => [
'general' => [
'showitem' => 'title, --linebreak--,addressline,zip,city,region, --linebreak--,latitude, longitude,--linebreak--, nav_to_url,--linebreak--, rel_marker, --linebreak--, popup_content, --linebreak--, image'
],
'paletteHidden' => [
'showitem' => 'hidden',
],
'paletteAccess' => [
'label' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.access',
'showitem' => '
starttime;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:starttime_formlabel,
endtime;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:endtime_formlabel,
--linebreak--,
fe_group;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:fe_group_formlabel
',
],
'language' => ['showitem' => 'sys_language_uid'],
],
];

View File

@ -0,0 +1,234 @@
<?php
return [
'ctrl' => [
'label' => 'title',
'label_alt' => 'map_icon',
'label_alt_force' => true,
'languageField' => 'sys_language_uid',
'transOrigDiffSourceField' => 'l10n_diffsource',
'default_sortby' => 'ORDER BY crdate',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
'prependAtCopy' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.prependAtCopy',
'delete' => 'deleted',
'title' => 'LLL:EXT:a2g_maps/Resources/Private/Language/locallang_db.xlf:a2g_maps.marker',
'versioningWS' => true,
'origUid' => 't3_origuid',
'thumbnail' => 'map_icon',
'enablecolumns' => [
'disabled' => 'hidden',
'starttime' => 'starttime',
'endtime' => 'endtime',
'fe_group' => 'fe_group',
],
'iconfile' => 'EXT:a2g_maps/Resources/Public/Icons/Marker/markerSolid.svg'
],
'columns' => [
'pid' => [
'label' => 'pid',
'config' => [
'type' => 'passthrough'
]
],
'crdate' => [
'label' => 'crdate',
'config' => [
'type' => 'input',
'renderType' => 'inputDateTime',
'eval' => 'datetime'
]
],
'cruser_id' => [
'label' => 'cruser_id',
'config' => [
'type' => 'passthrough'
]
],
'tstamp' => [
'label' => 'tstamp',
'config' => [
'type' => 'input',
'renderType' => 'inputDateTime',
'eval' => 'datetime'
]
],
'hidden' => [
'exclude' => true,
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.hidden',
'config' => [
'type' => 'check'
]
],
'starttime' => [
'exclude' => true,
'label' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:starttime_formlabel',
'config' => [
'type' => 'input',
'renderType' => 'inputDateTime',
'size' => 16,
'eval' => 'datetime,int',
'default' => 0,
'behaviour' => [
'allowLanguageSynchronization' => true,
],
]
],
'endtime' => [
'exclude' => true,
'label' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:endtime_formlabel',
'config' => [
'type' => 'input',
'renderType' => 'inputDateTime',
'size' => 16,
'eval' => 'datetime,int',
'default' => 0,
'behaviour' => [
'allowLanguageSynchronization' => true,
],
]
],
'fe_group' => [
'exclude' => true,
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.fe_group',
'config' => [
'type' => 'select',
'renderType' => 'selectMultipleSideBySide',
'size' => 5,
'maxitems' => 20,
'items' => [
[
'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.hide_at_login',
-1,
],
[
'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.any_login',
-2,
],
[
'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.usergroups',
'--div--',
],
],
'exclusiveKeys' => '-1,-2',
'foreign_table' => 'fe_groups',
'foreign_table_where' => 'ORDER BY fe_groups.title',
],
],
'sys_language_uid' => [
'exclude' => true,
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
'config' => [
'type' => 'language'
]
],
'l10n_diffsource' => [
'config' => [
'type' => 'passthrough',
'default' => ''
]
],
'title' => [
'exclude' => true,
'label' => 'LLL:EXT:a2g_maps/Resources/Private/Language/locallang_db.xlf:title',
'config' => [
'type' => 'input',
'size' => 20,
'eval' => 'trim',
'max' => 255,
'behaviour' => [
'allowLanguageSynchronization' => true,
],
]
],
'map_icon' => [
'exclude' => true,
'label' => 'LLL:EXT:a2g_maps/Resources/Private/Language/locallang_db.xlf:map_icon',
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
'map_icon',
[
'appearance' => [
'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference'
],
'overrideChildTca' => [
'types' => [
\TYPO3\CMS\Core\Resource\File::FILETYPE_UNKNOWN => [
'showitem' => '
--palette--;;filePalette
'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => [
'showitem' => '
--palette--;;filePalette
'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
'showitem' => '
title,
description,
alternative,
crop,
--palette--;;filePalette
'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => [
'showitem' => '
--palette--;;filePalette
'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => [
'showitem' => '
--palette--;;filePalette
'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => [
'showitem' => '
--palette--;;filePalette
'
],
],
],
'minitems' => 0,
'maxitems' => 1,
],
$GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
),
],
'rel_map_entry' => [
'label' => 'rel_travel_post',
'config' => [
'type' => 'passthrough'
]
]
],
'types' => [
'0' => [
'showitem' => '
--palette--;LLL:EXT:a2g_maps/Resources/Private/Language/locallang_db.xlf:palette.general;general,
--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:language,
--palette--;;language,
--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:access,
--palette--;;paletteHidden,
--palette--;;paletteAccess,
'
]
],
'palettes' => [
'general' => [
'showitem' => 'title, --linebreak--, map_icon'
],
'paletteHidden' => [
'showitem' => 'hidden',
],
'paletteAccess' => [
'label' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.access',
'showitem' => '
starttime;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:starttime_formlabel,
endtime;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:endtime_formlabel,
--linebreak--,
fe_group;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:fe_group_formlabel
',
],
'language' => ['showitem' => 'sys_language_uid'],
],
];

View File

@ -0,0 +1,4 @@
##################
#### TsConfig ####
##################
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:a2g_maps/Configuration/TsConfig/Page/Wizards.tsconfig">

View File

@ -0,0 +1,19 @@
################################
#### CONTENT ELEMENT WIZARD ####
################################
mod.wizards.newContentElement.wizardItems.a2gMaps {
after = common, menu, special, forms, plugins, blog
header = LLL:EXT:a2g_maps/Resources/Private/Language/locallang_db.xlf:wizard.group.maps
elements {
a2gmaps_map {
iconIdentifier = a2g_maps-plugin-map
title = LLL:EXT:a2g_maps/Resources/Private/Language/locallang_db.xlf:plugin.map.title
description = LLL:EXT:a2g_maps/Resources/Private/Language/locallang_db.xlf:plugin.map.description
tt_content_defValues {
CType = list
list_type = a2gmaps_map
}
}
}
show = *
}

View File

@ -0,0 +1,18 @@
plugin.tx_a2gmaps {
view {
# cat=altogether maps/file; type=string; label=Path to template root (FE)
templateRootPath = EXT:a2g_maps/Resources/Private/Templates/
# cat=altogether maps/file; type=string; label=Path to template partials (FE)
partialRootPath = EXT:a2g_maps/Resources/Private/Partials/
# cat=altogether maps/file; type=string; label=Path to template layouts (FE)
layoutRootPath = EXT:a2g_maps/Resources/Private/Layouts/
}
settings {
# cat=altogether maps//config; type=string; label=Path to default map marker
defaultMapMarker = /typo3conf/ext/a2g_openlayers/data/icons/markerSolid.svg
}
#persistence {
# cat=altogether maps//a; type=string; label=Default storage PID
# storagePid =
#}
}

View File

@ -0,0 +1,66 @@
plugin.tx_a2gmaps_map {
view {
templateRootPaths.0 = EXT:a2g_maps/Resources/Private/Templates/
templateRootPaths.1 = {$plugin.tx_a2gmaps.view.templateRootPath}
partialRootPaths.0 = EXT:a2g_maps/Resources/Private/Partials/
partialRootPaths.1 = {$plugin.tx_a2gmaps.view.partialRootPath}
layoutRootPaths.0 = EXT:a2g_maps/Resources/Private/Layouts/
layoutRootPaths.1 = {$plugin.tx_a2gmaps.view.layoutRootPath}
}
settings {
defaultMapMarker = {$plugin.tx_a2gmaps.settings.defaultMapMarker}
}
#persistence {
# storagePid = {$plugin.tx_a2gmaps.persistence.storagePid}
#recursive = 1
#}
}
page.includeJSFooter.a2gMapsConfig = EXT:a2g_maps/Resources/Public/JavaScript/a2gMap.config.js
page.includeJSFooter.a2gMapsModule= EXT:a2g_maps/Resources/Public/JavaScript/a2gMap.min.js
page.includeJSFooter.a2gMapsConfig {
disableCompression = 1
excludeFromConcatenation = 1
}
page.includeJSFooter.a2gMapsModule {
type = module
crossorigin = true
disableCompression = 1
excludeFromConcatenation = 1
}
page.includeCSS {
a2gMaps = EXT:a2g_maps/Resources/Public/Scss/a2gMap.scss
}
page.includeCSS.a2gMaps {
disableCompression = 1
excludeFromConcatenation = 1
}
a2gMapMarkers = PAGE
a2gMapMarkers {
typeNum = 1652369510
config {
disableAllHeaderCode = 1
admPanel = 0
additionalHeaders.10.header = Content-type:application/json
xhtml_cleaning = 0
debug = 0
no_cache = 0
}
10 = USER
10 {
userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
extensionName = A2gMaps
pluginName = map
vendorName = Altogether
controller = Map
settings < plugin.tx_a2gmaps_map.settings
persistence < plugin.tx_a2gmaps_map.persistence
view < plugin.tx_a2gmaps_map.view
}
}

View File

@ -0,0 +1,2 @@
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:a2g_maps/Configuration/TypoScript/Base/constants.typoscript">

View File

@ -0,0 +1,3 @@
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:a2g_maps/Configuration/TypoScript/Base/setup.typoscript">
#<INCLUDE_TYPOSCRIPT: source="FILE:EXT:a2g_maps/Configuration/TypoScript/GoogleAnalytics/setup.typoscript">

9
LICENSE Executable file
View File

@ -0,0 +1,9 @@
MIT License
Copyright (c) <year> <copyright holders>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

2
README.md Executable file
View File

@ -0,0 +1,2 @@
# a2g_maps

11
Resources/Private/.htaccess Executable file
View File

@ -0,0 +1,11 @@
# Apache < 2.3
<IfModule !mod_authz_core.c>
Order allow,deny
Deny from all
Satisfy All
</IfModule>
# Apache >= 2.3
<IfModule mod_authz_core.c>
Require all denied
</IfModule>

View File

@ -0,0 +1,101 @@
<?xml version="1.0" encoding="UTF-8"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file source-language="en" datatype="plaintext" original="EXT:a2g_maps/Resources/Private/Language/backend.xlf" date="2021-11-14T20:20:24Z" product-name="a2g_maps">
<header/>
<body>
<trans-unit id="flexform_map.position_from_map_controll_stuff">
<source>Position from map controll stuff</source>
</trans-unit>
<trans-unit id="flexform_map.hide">
<source>hide</source>
</trans-unit>
<trans-unit id="flexform_map.top">
<source>top</source>
</trans-unit>
<trans-unit id="flexform_map.bottom">
<source>bottom</source>
</trans-unit>
<trans-unit id="flexform_map.both">
<source>both</source>
</trans-unit>
<trans-unit id="flexform_map.yes">
<source>yes</source>
</trans-unit>
<trans-unit id="flexform_map.show_marker_list">
<source>show marker list</source>
</trans-unit>
<trans-unit id="flexform_map.order_marker_list_by">
<source>order marker list by</source>
</trans-unit>
<trans-unit id="flexform_map.none">
<source>none</source>
</trans-unit>
<trans-unit id="flexform_map.region_state">
<source>region / state</source>
</trans-unit>
<trans-unit id="flexform_map.use_layer_switcher">
<source>use layer switcher</source>
</trans-unit>
<trans-unit id="flexform_map.layer_switcher_init_value">
<source>layer switcher init value (%)</source>
</trans-unit>
<trans-unit id="flexform_map.map_zoom">
<source>map zoom</source>
</trans-unit>
<trans-unit id="flexform_map.map_max_zoom">
<source>map max zoom</source>
</trans-unit>
<trans-unit id="flexform_map.center_lat">
<source>center latitude</source>
</trans-unit>
<trans-unit id="flexform_map.center_lon">
<source>center longitude</source>
</trans-unit>
<trans-unit id="flexform_map.show_layer_select">
<source>show layer select</source>
</trans-unit>
<trans-unit id="flexform_map.show_my_position_btn">
<source>show my position button</source>
</trans-unit>
<trans-unit id="flexform_map.show_remove_marker_btn">
<source>show remove marker button</source>
</trans-unit>
<trans-unit id="flexform_map.show_fullscreen_btn">
<source>show fullscreen button</source>
</trans-unit>
<trans-unit id="flexform_map.show_zoom_slider">
<source>show zoom slider</source>
</trans-unit>
<trans-unit id="flexform_map.selectable_layers">
<source>selectable layers</source>
</trans-unit>
<trans-unit id="flexform_map.selectable_layers_description">
<source>one layer is requiered to show a map. use two if layer switcher is active and/or use more if layer select is active</source>
</trans-unit>
<trans-unit id="flexform_map.markers">
<source>markers</source>
</trans-unit>
<trans-unit id="flexform_map.gpx_data">
<source>gpx data</source>
</trans-unit>
</body>
</file>
</xliff>

View File

@ -0,0 +1,126 @@
<?xml version="1.0" encoding="UTF-8"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file source-language="en" target-language="de" datatype="plaintext" original="EXT:a2g_maps/Resources/Private/Language/backend.xlf" date="2022-01-25T14:39:22Z" product-name="a2g_maps">
<header/>
<body>
<trans-unit id="flexform_map.position_from_map_controll_stuff">
<source>Position from map controll stuff</source>
<target>Position von Karten Bedien Elementen</target>
</trans-unit>
<trans-unit id="flexform_map.hide">
<source>hide</source>
<target>verbergen</target>
</trans-unit>
<trans-unit id="flexform_map.top">
<source>top</source>
<target>darüber</target>
</trans-unit>
<trans-unit id="flexform_map.bottom">
<source>bottom</source>
<target>darunter</target>
</trans-unit>
<trans-unit id="flexform_map.both">
<source>both</source>
<target>beide</target>
</trans-unit>
<trans-unit id="flexform_map.yes">
<source>yes</source>
<target>ja</target>
</trans-unit>
<trans-unit id="flexform_map.show_marker_list">
<source>show marker list</source>
<target>Karten Eintragungen als Liste darstellen</target>
</trans-unit>
<trans-unit id="flexform_map.order_marker_list_by">
<source>order marker list by</source>
<target>Karten Eintragungs Liste sortieren nach</target>
</trans-unit>
<trans-unit id="flexform_map.none">
<source>none</source>
<target>ohne Sortierung</target>
</trans-unit>
<trans-unit id="flexform_map.region_state">
<source>region/state</source>
<target>Region/Bundesland</target>
</trans-unit>
<trans-unit id="flexform_map.use_layer_switcher">
<source>use layer switcher</source>
<target>Anzeigen von Karten Slider</target>
</trans-unit>
<trans-unit id="flexform_map.layer_switcher_init_value">
<source>layer switcher init value (%)</source>
<target>Karten Slider initial Wert (%)</target>
</trans-unit>
<trans-unit id="flexform_map.map_zoom">
<source>map zoom</source>
<target>initial Zoom</target>
</trans-unit>
<trans-unit id="flexform_map.map_max_zoom">
<source>map max zoom</source>
<target>maximaler Zoom</target>
</trans-unit>
<trans-unit id="flexform_map.center_lat">
<source>center latitude</source>
<target>initialer Breitengrad</target>
</trans-unit>
<trans-unit id="flexform_map.center_lon">
<source>center longitude</source>
<target>initialer Längengrad</target>
</trans-unit>
<trans-unit id="flexform_map.show_layer_select">
<source>show layer select</source>
<target>Karten Schichten selektierbar</target>
</trans-unit>
<trans-unit id="flexform_map.show_my_position_btn">
<source>show my position button</source>
<target>meine Position anzeigen Knopf</target>
</trans-unit>
<trans-unit id="flexform_map.show_remove_marker_btn">
<source>show remove marker button</source>
<target>Karten Markierung ein- ausblenden Knopf anzeigen</target>
</trans-unit>
<trans-unit id="flexform_map.show_fullscreen_btn">
<source>show fullscreen button</source>
<target>Karte auf ganzen Bildschirm Knopf</target>
</trans-unit>
<trans-unit id="flexform_map.show_zoom_slider">
<source>show zoom slider</source>
<target>Zoom Slider anzeigen</target>
</trans-unit>
<trans-unit id="flexform_map.selectable_layers">
<source>selectable layers</source>
<target>Karten Schichten</target>
</trans-unit>
<trans-unit id="flexform_map.selectable_layers_description">
<source>one layer is requiered to show a map. use two if layer switcher is active and/or use more if layer select is active</source>
<target>Eine Karten Schicht ist notwendig. Bei verwenudung vom Karten Slider sind zwei notwendig und/oder bei der verwendung von selektierbaren Karten Schichten sind min. zwei notwendig.</target>
</trans-unit>
<trans-unit id="flexform_map.markers">
<source>markers</source>
<target>Karten Markierungen</target>
</trans-unit>
<trans-unit id="flexform_map.gpx_data">
<source>gpx data</source>
<target>gpx Daten</target>
</trans-unit>
</body>
</file>
</xliff>

View File

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file source-language="en" target-language="de" datatype="plaintext" original="EXT:a2g_products/Resources/Private/Language/locallang.xlf" date="2021-11-18T10:42:07Z" product-name="a2g_products">
<header/>
<body>
<trans-unit id="product_list.product_detail_link" resname="product_list.product_detail_link">
<source>detail</source>
<target>mehr erfahren</target>
</trans-unit>
<trans-unit id="product.product_nr" resname="product.product_nr">
<source>article nr</source>
<target>Artikel Nr</target>
</trans-unit>
<trans-unit id="product_list.search" resname="product_list.search">
<source>search</source>
<target>suchen</target>
</trans-unit>
<trans-unit id="product_list.advanced_search" resname="product_list.advanced_search">
<source>advanced search</source>
<target>erweiterte Suche</target>
</trans-unit>
<trans-unit id="product_list.search_input_placeholder" resname="product_list.search_input_placeholder">
<source>search</source>
<target>suche</target>
</trans-unit>
<trans-unit id="related_products" resname="related_products">
<source>related products</source>
<target>Produkte mit dieser Zutat</target>
</trans-unit>
<trans-unit id="used_ingredients" resname="used_ingredients">
<source>used ingredients</source>
<target>Verwendete Zutaten</target>
</trans-unit>
</body>
</file>
</xliff>

View File

@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file source-language="en" target-language="de" datatype="plaintext" original="EXT:a2g_maps/Resources/Private/Language/locallang_db.xlf" date="2022-01-25T14:39:22Z" product-name="a2g_maps">
<header/>
<body>
<trans-unit id="popup_content" resname="tx_a2gmaps_domain_model_mapentry">
<source>additional popup content</source>
<target>Zusaetzlicher aufklappende Fenster Inhalt</target>
</trans-unit>
<trans-unit id="nav_to_url" resname="tx_a2gmaps_domain_model_mapentry">
<source>navigation url</source>
<target>Navigations Link</target>
</trans-unit>
<trans-unit id="rel_marker" resname="tx_a2gmaps_domain_model_mapentry">
<source>marker icon ( optional )</source>
<target>Marker Icon ( optional )</target>
</trans-unit>
<trans-unit id="a2g_maps" xml:space="preserve">
<source>Map Entry</source>
<target>Karten Eintrag</target>
</trans-unit>
<trans-unit id="pages.rel_coordinate" xml:space="preserve">
<source>Coordinate</source>
<target>Koordinaten</target>
</trans-unit>
<trans-unit id="a2g_maps.name" xml:space="preserve">
<source>Map</source>
<target>Karte</target>
</trans-unit>
<trans-unit id="a2g_maps.description" xml:space="preserve">
<source>altogether Map</source>
<target>altogether Karte</target>
</trans-unit>
<trans-unit id="a2gmaps_map.name" xml:space="preserve">
<source>Map</source>
<target>Karte</target>
</trans-unit>
<trans-unit id="palette.general" xml:space="preserve">
<source>General</source>
<target>General</target>
</trans-unit>
<trans-unit id="palette.general" resname="tx_a2gmaps_domain_model_mapentry" xml:space="preserve">
<source>General</source>
<target>General</target>
</trans-unit>
<trans-unit id="wizard.group.maps" xml:space="preserve">
<source>Maps</source>
<target>Karten</target>
</trans-unit>
<trans-unit id="a2g_maps.marker" resname="tx_a2gmaps_domain_model_marker" xml:space="preserve">
<source>Map Marker</source>
<target>Karten Markierung</target>
</trans-unit>
<trans-unit id="plugin.map.title" xml:space="preserve">
<source>map</source>
<target>Karte</target>
</trans-unit>
<trans-unit id="plugin.map.description" xml:space="preserve">
<source>Altogether map</source>
<target>Altogether Karte</target>
</trans-unit>
</body>
</file>
</xliff>

View File

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file source-language="en" datatype="plaintext" original="EXT:a2g_products/Resources/Private/Language/locallang.xlf" date="2021-11-18T10:42:07Z" product-name="a2g_products">
<header/>
<body>
<trans-unit id="product_list.product_detail_link" resname="product_list.product_detail_link">
<source>detail</source>
</trans-unit>
<trans-unit id="product.product_nr" resname="product.product_nr">
<source>article nr</source>
</trans-unit>
<trans-unit id="product_list.search" resname="product_list.search">
<source>search</source>
</trans-unit>
<trans-unit id="product_list.advanced_search" resname="product_list.advanced_search">
<source>advanced search</source>
</trans-unit>
<trans-unit id="product_list.search_input_placeholder" resname="product_list.search_input_placeholder">
<source>search</source>
</trans-unit>
<trans-unit id="related_products" resname="related_products">
<source>related products</source>
</trans-unit>
<trans-unit id="used_ingredients" resname="used_ingredients">
<source>used ingredients</source>
</trans-unit>
</body>
</file>
</xliff>

View File

@ -0,0 +1,70 @@
<?xml version="1.0" encoding="UTF-8"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file source-language="en" datatype="plaintext" original="EXT:a2g_maps/Resources/Private/Language/backend.xlf" date="2021-11-14T20:20:24Z" product-name="a2g_maps">
<header/>
<body>
<trans-unit id="title" resname="tx_a2gmaps_domain_model_marker">
<source>title</source>
</trans-unit>
<trans-unit id="map_icon" resname="tx_a2gmaps_domain_model_marker">
<source>map icon</source>
</trans-unit>
<trans-unit id="popup_content" resname="tx_a2gmaps_domain_model_mapentry">
<source>additional popup content</source>
</trans-unit>
<trans-unit id="nav_to_url" resname="tx_a2gmaps_domain_model_mapentry">
<source>navigation url</source>
</trans-unit>
<trans-unit id="rel_marker" resname="tx_a2gmaps_domain_model_mapentry">
<source>marker icon ( optional )</source>
</trans-unit>
<trans-unit id="a2g_maps" xml:space="preserve">
<source>Map Entry</source>
</trans-unit>
<trans-unit id="pages.rel_coordinate" xml:space="preserve">
<source>Coordinate</source>
</trans-unit>
<trans-unit id="a2g_maps.name" xml:space="preserve">
<source>Map</source>
</trans-unit>
<trans-unit id="a2g_maps.description" xml:space="preserve">
<source>altogether Map</source>
</trans-unit>
<trans-unit id="a2gmaps_map.name" xml:space="preserve">
<source>Map</source>
</trans-unit>
<trans-unit id="palette.general" resname="tx_a2gmaps_domain_model_mapentry" xml:space="preserve">
<source>General</source>
</trans-unit>
<trans-unit id="palette.general" xml:space="preserve">
<source>General</source>
</trans-unit>
<trans-unit id="wizard.group.maps" xml:space="preserve">
<source>Maps</source>
</trans-unit>
<trans-unit id="a2g_maps.marker" resname="tx_a2gmaps_domain_model_marker" xml:space="preserve">
<source>Map Marker</source>
</trans-unit>
<trans-unit id="plugin.map.title" xml:space="preserve">
<source>Map</source>
</trans-unit>
<trans-unit id="plugin.map.description" xml:space="preserve">
<source>Altogether map</source>
</trans-unit>
</body>
</file>
</xliff>

View File

@ -0,0 +1,5 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<div class="a2g-travel-blog">
<f:render section="content" />
</div>
</html>

View File

@ -0,0 +1,5 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<div class="a2g-travel-blog-popup">
<f:render section="content" />
</div>
</html>

View File

@ -0,0 +1,80 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:bk2k="http://typo3.org/ns/BK2K/BootstrapPackage/ViewHelpers" data-namespace-typo3-fluid="true">
<picture>
<f:for each="{variants}" key="name" as="variant">
<f:variable name="breakpoint">{variant.breakpoint as integer}</f:variable>
<f:variable name="width">{variant.width as integer}</f:variable>
<f:variable name="height" value="" />
<f:if condition="{width}">
<f:if condition="{variant.aspectRatio}">
<f:variable name="aspectRatio">{variant.aspectRatio as float}</f:variable>
<f:variable name="height">{width / aspectRatio}</f:variable>
<f:variable name="height">{height as integer}</f:variable>
</f:if>
<f:variable name="mediaQuery">{f:if(condition: breakpoint, then: 'media="(min-width: {breakpoint}px)"')}</f:variable>
<f:if condition="{variant.sizes}">
<f:variable name="srcset" value="" />
<f:for each="{variant.sizes}" key="sizeKey" as="sizeConfig" iteration="iteration">
<f:variable name="sizeWidth">{sizeConfig.multiplier as float}</f:variable>
<f:variable name="sizeWidth">{sizeWidth * width}</f:variable>
<f:variable name="sizeHeight" value="" />
<f:if condition="{height}">
<f:then>
<f:variable name="sizeHeight">{sizeConfig.multiplier as float}</f:variable>
<f:variable name="sizeHeight">{sizeHeight * height}</f:variable>
<f:variable name="sizeUrl">{f:uri.image(image: file, cropVariant: name, width: '{sizeWidth}c', height: '{sizeHeight}c',absolute:'true')}</f:variable>
</f:then>
<f:else>
<f:if condition="{maxWidth} < {sizeWidth}">
<f:then>
<f:variable name="sizeUrl">{f:uri.image(image: file, cropVariant: 'default', width: maxWidth, absolute:'true')}</f:variable>
</f:then>
<f:else>
<f:variable name="sizeUrl">{f:uri.image(image: file, cropVariant: 'default', width: sizeWidth, absolute:'true')}</f:variable>
</f:else>
</f:if>
</f:else>
</f:if>
<f:variable name="srcset">{srcset}{sizeUrl} {sizeKey}{f:if(condition: iteration.isLast, else: ',')}</f:variable>
</f:for>
</f:if>
<source data-variant="{name}" {f:if(condition: sizeHeight, then: 'data-width="{width}" data-height="{sizeHeight}"', else: 'data-maxwidth="{width}"')} {mediaQuery->f:format.raw()} srcset="{srcset}">
</f:if>
</f:for>
<f:variable name="defaultWidth" value="{variants.default.width}" />
<f:variable name="defaultAspectRatio" value="{variants.default.aspectRatio}" />
<f:if condition="{defaultAspectRatio}">
<f:variable name="aspectRatio">{defaultAspectRatio as float}</f:variable>
<f:variable name="defaultHeight">{defaultWidth / aspectRatio}</f:variable>
<f:variable name="defaultHeight">{defaultHeight as integer}c</f:variable>
</f:if>
<f:if condition="{defaultHeight}">
<f:then>
<f:variable name="src" value="{f:uri.image(image: file, cropVariant: 'default', width: defaultWidth, height: defaultHeight, absolute:'true')}" />
</f:then>
<f:else>
<f:if condition="{maxWidth}">
<f:then>
<f:variable name="src" value="{f:uri.image(image: file, cropVariant: 'default', width: maxWidth, absolute:'true')}" />
</f:then>
<f:else>
<f:variable name="src" value="{f:uri.image(image: file, cropVariant: 'default', width: defaultWidth, absolute:'true')}" />
</f:else>
</f:if>
</f:else>
</f:if>
<f:variable name="finalWidth" value="{bk2k:data.imageInfo(src: src, property: 'width')}" />
<f:variable name="finalHeight" value="{bk2k:data.imageInfo(src: src, property: 'height')}" />
<f:if condition="itemprop">
<f:then>
<img loading="lazy" itemprop="image" src="{src}" width="{finalWidth}" height="{finalHeight}" intrinsicsize="{finalWidth}x{finalHeight}" title="{file.properties.title}" alt="{file.properties.alternative}">
</f:then>
<f:else>
<img loading="lazy" src="{src}" width="{finalWidth}" height="{finalHeight}" intrinsicsize="{finalWidth}x{finalHeight}" title="{file.properties.title}" alt="{file.properties.alternative}">
</f:else>
</f:if>
</picture>
</html>

View File

@ -0,0 +1,31 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:bk2k="http://typo3.org/ns/BK2K/BootstrapPackage/ViewHelpers" data-namespace-typo3-fluid="true">
<f:if condition="{settings.useLayerSwitcher} === '1' && {settings.controllsPositions} === '2'">
<input class="a2g-map-layer-swipe form-range" type="range" style="width: 100%" value="{settings.layerSwitcherValue}">
</f:if>
<div class="d-flex justify-content-center">
<f:if condition="{settings.showRemoveMarkerButton} === '1'">
<div class="m-3 form-check form-switch">
<input id="{mapId}-hide-marker-{settings.controllsPositions}" class="form-check-input a2g-map-marker-visible-switcher" type="checkbox">
<label for="{mapId}-hide-marker-{settings.controllsPositions}" class="form-check-label">hide marker</label>
</div>
</f:if>
<f:if condition="{settings.showMyPositionButton} === '1'">
<div class="m-3 form-check form-switch">
<input id="{mapId}-lacate-me-{settings.controllsPositions}" class="form-check-input a2g-map-geolocate-me" type="checkbox">
<label for="{mapId}-hide-marker-{settings.controllsPositions}" class="form-check-label">locate me</label>
</div>
</f:if>
<f:if condition="{settings.showLayerSelect} === '1' && {countMapLayers}>1">
<div class="m-3">
<label>Geometry type &nbsp;</label>
<select class="a2g-map-layer-select">
</select>
</div>
</f:if>
</div>
<f:if condition="{settings.useLayerSwitcher} === '1' && ( {settings.controllsPositions} === '1' || {settings.controllsPositions} === '3'} )">
<input class="a2g-map-layer-swipe form-range" type="range" style="width: 100%" value="{settings.layerSwitcherValue}">
</f:if>
</html>

View File

@ -0,0 +1,72 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:bk2k="http://typo3.org/ns/BK2K/BootstrapPackage/ViewHelpers" data-namespace-typo3-fluid="true">
<bk2k:data.imageVariants as="variants" variants="{variants}" multiplier="{columnConfig.multiplier}" gutters="{columnConfig.gutters}" corrections="{columnConfig.corrections}" />
<f:for each="{mapEntries}" iteration="it" as="mapEntriesa" key="region">
<div class="accordion" id="a2g-maps-region-accordion"><div class="accordion-item">
<h2 class="accordion-header" id="a2g-maps-region-accodion-{it.cycle}-heading">
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#a2g-maps-region-accodion-{it.cycle}" aria-expanded="false" aria-controls="a2g-maps-region-accodion-{it.cycle}">
{region}
</button>
</h2>
<div id="a2g-maps-region-accodion-{it.cycle}" class="accordion-collapse collapse" aria-labelledby="a2g-maps-region-accodion-{it.cycle}-heading" data-bs-parent="#a2g-maps-region-accodion">
<div class="accordion-body">
<div class="card-group-element card-group-element-align-left card-group-element-columns-3">
<f:for each="{mapEntriesa}" as="mapEntry">
<div class="card-group-element-item">
<div class="card">
<div class="card-body">
<div>
<f:if condition="{mapEntry.title} !== ''">
<f:then>
<h4>
{mapEntry.title}
</h4>
</f:then>
</f:if>
<div>
<f:if condition="{mapEntry.addressline} !== ''">
<f:then>
{mapEntry.addressline}
</f:then>
</f:if>
<f:if condition="{mapEntry.zip}">
<f:then>
<br/>{mapEntry.zip}
</f:then>
</f:if>
<f:if condition="{mapEntry.city}">
<f:then>
{mapEntry.city}
</f:then>
</f:if>
<f:if condition="{mapEntry.region} !== ''">
<f:then>
<br/>{mapEntry.region}
</f:then>
</f:if>
</div>
<f:if condition="{mapEntry.popupContent}">
<f:then>
<f:format.htmlentitiesDecode>
{mapEntry.popupContent}
</f:format.htmlentitiesDecode>
</f:then>
</f:if>
<f:if condition="{mapEntry.navToUrl}">
<f:then>
<a href="{mapEntry.navToUrl}" target="_blank"><f:translate key="nav_me_to" default="mich navigieren"></f:translate></a>
</f:then>
</f:if>
</div>
</div>
</div>
</div>
</f:for>
</div>
</div>
</div>
</div>
</div>
</f:for>
</html>

View File

@ -0,0 +1,31 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:bk2k="http://typo3.org/ns/BK2K/BootstrapPackage/ViewHelpers" data-namespace-typo3-fluid="true">
<f:layout name="Default" />
<f:section name="content">
<bk2k:data.imageVariants as="variants" variants="{variants}" multiplier="{columnConfig.multiplier}" gutters="{columnConfig.gutters}" corrections="{columnConfig.corrections}" />
<div id="a2g-costum-icons" data-content='{mapIcons}'></div>
<div class="a2g-map-wrap">
<div class="ol-popup a2g-map-popup d-none" >
<a href="#" class="ol-popup-closer a2g-map-popup-closer"></a>
<div class="a2g-map-popup-content"></div>
</div>
<f:if condition="{settings.controllsPositions} == '1' || {settings.controllsPositions} == '3'">
<f:then>
<f:render partial="Map/Controll" arguments="{_all}"></f:render>
</f:then>
</f:if>
<div id="{mapId}" class="a2g-map"
data-map-config='{mapConfig}'
></div>
<f:if condition="{settings.controllsPositions} == '2' || {settings.controllsPositions} == '3'">
<f:render partial="Map/Controll" arguments="{_all}"></f:render>
</f:if>
</div>
<f:if condition="{settings.showMarkerList} == '1'">
<f:then>
<div class="a2g-map-list mt-3">
<f:render partial="Map/List" arguments="{_all}"></f:render>
</div>
</f:then>
</f:if>
</f:section>
</html>

View File

@ -0,0 +1,54 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:bk2k="http://typo3.org/ns/BK2K/BootstrapPackage/ViewHelpers" data-namespace-typo3-fluid="true">
<f:layout name="MapPopupContent" />
<f:section name="content">
<bk2k:data.imageVariants as="variants" variants="{variants}" multiplier="{columnConfig.multiplier}" gutters="{columnConfig.gutters}" corrections="{columnConfig.corrections}" />
<f:if condition="{mapEntry.image}">
<f:then>
<f:render partial="Image" arguments="{file: mapEntry.image, settings: settings, variants: variants, maxWidth: 230}" />
</f:then>
</f:if>
<div class="{f:if(condition:'{mapEntry.image}',then:'mt-2')}">
<f:if condition="{mapEntry.title} !== ''">
<f:then>
<h4>
{mapEntry.title}
</h4>
</f:then>
</f:if>
<div>
<f:if condition="{mapEntry.addressline} !== ''">
<f:then>
{mapEntry.addressline}
</f:then>
</f:if>
<f:if condition="{mapEntry.zip}">
<f:then>
<br/>{mapEntry.zip}
</f:then>
</f:if>
<f:if condition="{mapEntry.city}">
<f:then>
{mapEntry.city}
</f:then>
</f:if>
<f:if condition="{mapEntry.region} !== ''">
<f:then>
<br/>{mapEntry.region}
</f:then>
</f:if>
</div>
<f:if condition="{mapEntry.popupContent}">
<f:then>
<f:format.htmlentitiesDecode>
{mapEntry.popupContent}
</f:format.htmlentitiesDecode>
</f:then>
</f:if>
<f:if condition="{mapEntry.navToUrl}">
<f:then>
<a href="{mapEntry.navToUrl}" target="_blank"><f:translate key="nav_me_to" default="mich navigieren"></f:translate></a>
</f:then>
</f:if>
</div>
</f:section>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 94 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 114 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 12 KiB

BIN
Resources/Public/Icons/a2g.gif Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
Resources/Public/Icons/map.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View File

@ -0,0 +1,6 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Other/javascript.js to edit this template
*/

9
Resources/Public/JavaScript/a2gMap.min.js vendored Executable file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -0,0 +1 @@
Subproject commit a0a5950ea34949b1fc08855afe1a67fd52e312b8

View File

@ -0,0 +1,342 @@
{
"type": "FeatureCollection",
"totalFeatures": 1046,
"features": [
{
"type": "Feature",
"id": "ENGEFPVANLOGD.fid-52fe0c36_17dec082096_4f67",
"geometry": {
"type": "Point",
"coordinates": [
16.349805849210597,
48.25017142860945
]
},
"geometry_name": "SHAPE",
"properties": {
"LEISTUNG": 5.7,
"icon": 2
}
},
{
"type": "Feature",
"id": "ENGEFPVANLOGD.fid-52fe0c36_17dec082096_4f68",
"geometry": {
"type": "Point",
"coordinates": [
16.31467754920881,
48.15703986239329
]
},
"geometry_name": "SHAPE",
"properties": {
"OBJECTID": 3559,
"BEZ": 1230,
"BAUJAHR": 2012,
"PVID": "PV842",
"LEISTUNG": 6.24,
"SE_ANNO_CAD_DATA": null
}
},
{
"type": "Feature",
"id": "ENGEFPVANLOGD.fid-52fe0c36_17dec082096_4f69",
"geometry": {
"type": "Point",
"coordinates": [
16.308305377224514,
48.22034516003518
]
},
"geometry_name": "SHAPE",
"properties": {
"OBJECTID": 3560,
"BEZ": 1160,
"BAUJAHR": 2013,
"PVID": "PV844",
"LEISTUNG": 4.29,
"SE_ANNO_CAD_DATA": null,
"icon": 5
}
},
{
"type": "Feature",
"id": "ENGEFPVANLOGD.fid-52fe0c36_17dec082096_4f6a",
"geometry": {
"type": "Point",
"coordinates": [
16.33275095625591,
48.16179398555423
]
},
"geometry_name": "SHAPE",
"properties": {
"OBJECTID": 3561,
"BEZ": 1120,
"BAUJAHR": 2013,
"PVID": "PV845",
"LEISTUNG": 3.9,
"SE_ANNO_CAD_DATA": null,
"icon": 2
}
},
{
"type": "Feature",
"id": "ENGEFPVANLOGD.fid-52fe0c36_17dec082096_4f6b",
"geometry": {
"type": "Point",
"coordinates": [
16.504359669913917,
48.24089953373162
]
},
"geometry_name": "SHAPE",
"properties": {
"OBJECTID": 3562,
"BEZ": 1220,
"BAUJAHR": 2013,
"PVID": "PV846",
"LEISTUNG": 3.36,
"SE_ANNO_CAD_DATA": null,
"icon": 1
}
},
{
"type": "Feature",
"id": "ENGEFPVANLOGD.fid-52fe0c36_17dec082096_4f6c",
"geometry": {
"type": "Point",
"coordinates": [
16.40266752923873,
48.20312696321299
]
},
"geometry_name": "SHAPE",
"properties": {
"OBJECTID": 3563,
"BEZ": 1020,
"BAUJAHR": 2013,
"PVID": "PV847",
"LEISTUNG": 7.99,
"SE_ANNO_CAD_DATA": null,
"icon": 2
}
},
{
"type": "Feature",
"id": "ENGEFPVANLOGD.fid-52fe0c36_17dec082096_4f6d",
"geometry": {
"type": "Point",
"coordinates": [
16.511705685818,
48.208327900902106
]
},
"geometry_name": "SHAPE",
"properties": {
"OBJECTID": 3564,
"BEZ": 1220,
"BAUJAHR": 2012,
"PVID": "PV849",
"LEISTUNG": 3.12,
"SE_ANNO_CAD_DATA": null,
"icon": 2
}
},
{
"type": "Feature",
"id": "ENGEFPVANLOGD.fid-52fe0c36_17dec082096_4f6e",
"geometry": {
"type": "Point",
"coordinates": [
16.421723096267158,
48.25005414108675
]
},
"geometry_name": "SHAPE",
"properties": {
"OBJECTID": 3565,
"BEZ": 1210,
"BAUJAHR": 2013,
"PVID": "PV850",
"LEISTUNG": 2.2,
"SE_ANNO_CAD_DATA": null,
"icon": 2
}
},
{
"type": "Feature",
"id": "ENGEFPVANLOGD.fid-52fe0c36_17dec082096_4f6f",
"geometry": {
"type": "Point",
"coordinates": [
16.277447919342887,
48.19733447095196
]
},
"geometry_name": "SHAPE",
"properties": {
"OBJECTID": 3566,
"BEZ": 1140,
"BAUJAHR": 2013,
"PVID": "PV852",
"LEISTUNG": 8.33,
"SE_ANNO_CAD_DATA": null,
"icon": 2
}
},
{
"type": "Feature",
"id": "ENGEFPVANLOGD.fid-52fe0c36_17dec082096_4f69",
"geometry": {
"type": "Point",
"coordinates": [
16.308305377224514,
48.22034516003518
]
},
"geometry_name": "SHAPE",
"properties": {
"OBJECTID": 3560,
"BEZ": 1160,
"BAUJAHR": 2013,
"PVID": "PV844",
"LEISTUNG": 4.29,
"SE_ANNO_CAD_DATA": null,
"icon": 5
}
},
{
"type": "Feature",
"id": "ENGEFPVANLOGD.fid-52fe0c36_17dec082096_4f6a",
"geometry": {
"type": "Point",
"coordinates": [
16.33275095625591,
-48.16179398555423
]
},
"geometry_name": "SHAPE",
"properties": {
"OBJECTID": 3561,
"BEZ": 1120,
"BAUJAHR": 2013,
"PVID": "PV845",
"LEISTUNG": 3.9,
"SE_ANNO_CAD_DATA": null,
"icon": 2
}
},
{
"type": "Feature",
"id": "ENGEFPVANLOGD.fid-ee",
"geometry": {
"type": "Point",
"coordinates": [
16.504359669913917,
-48.24089953373162
]
},
"geometry_name": "SHAPE",
"properties": {
"OBJECTID": 3562,
"BEZ": 1220,
"BAUJAHR": 2013,
"PVID": "PV846",
"LEISTUNG": 3.36,
"SE_ANNO_CAD_DATA": null,
"icon": 1
}
},
{
"type": "Feature",
"id": "ENGEFPVANLOGD.fid-ff",
"geometry": {
"type": "Point",
"coordinates": [
16.40266752923873,
-48.20312696321299
]
},
"geometry_name": "SHAPE",
"properties": {
"OBJECTID": 3563,
"BEZ": 1020,
"BAUJAHR": 2013,
"PVID": "PV847",
"LEISTUNG": 7.99,
"SE_ANNO_CAD_DATA": null,
"icon": 2
}
},
{
"type": "Feature",
"id": "ENGEFPVANLOGD.fid-dd",
"geometry": {
"type": "Point",
"coordinates": [
16.511705685818,
-48.208327900902106
]
},
"geometry_name": "SHAPE",
"properties": {
"OBJECTID": 3564,
"BEZ": 1220,
"BAUJAHR": 2012,
"PVID": "PV849",
"LEISTUNG": 3.12,
"SE_ANNO_CAD_DATA": null,
"icon": 2
}
},
{
"type": "Feature",
"id": "ENGEFPVANLOGD.fid-a",
"geometry": {
"type": "Point",
"coordinates": [
-16.421723096267158,
48.25005414108675
]
},
"geometry_name": "SHAPE",
"properties": {
"OBJECTID": 3565,
"BEZ": 1210,
"BAUJAHR": 2013,
"PVID": "PV850",
"LEISTUNG": 2.2,
"SE_ANNO_CAD_DATA": null,
"icon": 2
}
},
{
"type": "Feature",
"id": "ENGEFPVANLOGD.fid-d",
"geometry": {
"type": "Point",
"coordinates": [
-16.277447919342887,
48.19733447095196
]
},
"geometry_name": "SHAPE",
"properties": {
"OBJECTID": 3566,
"BEZ": 1140,
"BAUJAHR": 2013,
"PVID": "PV852",
"LEISTUNG": 8.33,
"SE_ANNO_CAD_DATA": null,
"icon": 2
}
}
],
"crs": {
"type": "name",
"properties": {
"name": "urn:ogc:def:crs:EPSG::4326"
}
}
}

1
a2g_maps Symbolic link
View File

@ -0,0 +1 @@
/home/www/shared_extensions/dev/ext/a2g_maps

47
composer.json Executable file
View File

@ -0,0 +1,47 @@
{
"name": "altogether/a2g-maps",
"type": "typo3-cms-extension",
"description": "",
"authors": [
{
"name": "Raphael Martin",
"role": "Developer"
}
],
"license": "GPL-2.0-or-later",
"require": {
"typo3/cms-core": "^10.4"
},
"require-dev": {
"typo3/testing-framework": "^6.8"
},
"autoload": {
"psr-4": {
"A2G\\A2gMaps\\": "Classes"
}
},
"autoload-dev": {
"psr-4": {
"A2G\\A2gMaps\\Tests\\": "Tests"
}
},
"replace": {
"typo3-ter/a2g-maps": "self.version"
},
"config": {
"vendor-dir": ".Build/vendor",
"bin-dir": ".Build/bin"
},
"scripts": {
"post-autoload-dump": [
"TYPO3\\TestingFramework\\Composer\\ExtensionTestEnvironment::prepare"
]
},
"extra": {
"typo3/cms": {
"cms-package-dir": "{$vendor-dir}/typo3/cms",
"web-dir": ".Build/public",
"extension-key": "a2g_maps"
}
}
}

31
ext_emconf.php Executable file
View File

@ -0,0 +1,31 @@
<?php
/***************************************************************
* Extension Manager/Repository config file for ext: "a2g_products"
*
* Auto generated by Extension Builder 2021-08-16
*
* Manual updates:
* Only the data in the array - anything else is removed by next write.
* "version" and "dependencies" must not be touched!
***************************************************************/
$EM_CONF[$_EXTKEY] = [
'title' => 'altogether Maps',
'description' => '',
'category' => 'plugin',
'author' => 'Raphael Martin',
'author_email' => 'raphy.martin@gmail.com',
'state' => 'alpha',
'clearCacheOnLoad' => 0,
'version' => '1.0.0',
'constraints' => [
'depends' => [
'typo3' => '10.4.0-12.1.99',
'a2g_toolkit' => '1.0.0-1.5.99',
'tt_address' => '6.1.0-7.1.99'
],
'conflicts' => [],
'suggests' => [],
],
];

76
ext_localconf.php Executable file
View File

@ -0,0 +1,76 @@
<?php
defined('TYPO3_MODE') || die();
/* ===========================================================================
Hooks
=========================================================================== */
// Add wizard with map for setting geo location
$GLOBALS['TYPO3_CONF_VARS']['SYS']['formEngine']['nodeRegistry'][1650971524] = [
'nodeName' => 'latLonMapWizard',
'priority' => 30,
'class' => \A2G\A2gMaps\FormEngine\FieldControl\LocationMapWizard::class
];
// PageTS
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:a2g_maps/Configuration/TsConfig/Page/All.tsconfig">');
call_user_func(static function() {
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'A2gMaps',
'map',
[
\A2G\A2gMaps\Controller\MapController::class => 'map, popup, mapMarkers'
],
// non-cacheable actions
[
\A2G\A2gMaps\Controller\MapController::class => ''
]
);
// wizards
/*
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
'mod {
wizards.newContentElement.wizardItems.plugins {
elements {
map {
iconIdentifier = a2g_maps-plugin-map
title = LLL:EXT:a2g_maps/Resources/Private/Language/locallang_db.xlf:a2g_maps.name
description = LLL:EXT:a2g_maps/Resources/Private/Language/locallang_db.xlf:a2g_maps.description
tt_content_defValues {
CType = list
list_type = a2g_maps
}
}
}
show = *
}
}'
);
*/
$pluginIcons = [
'a2g_maps-plugin-map' => 'EXT:a2g_maps/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]
);
}
});
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass']['a2g_maps']
= \A2G\A2gMaps\Hooks\MapEntryDataHandlerHooks::class;
/***************
* Register "a2g" as global fluid namespace
*/
//$GLOBALS['TYPO3_CONF_VARS']['SYS']['fluid']['namespaces']['a2gmaps'][] = 'A2G\\A2gMaps\\ViewHelpers';

11
ext_tables.php Executable file
View File

@ -0,0 +1,11 @@
<?php
defined('TYPO3_MODE') || die();
call_user_func(static function () {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_a2gmaps_domain_model_mapentry');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_a2gmaps_domain_model_marker');
});

20
ext_tables.sql Executable file
View File

@ -0,0 +1,20 @@
CREATE TABLE tx_a2gmaps_domain_model_mapentry (
latitude decimal(11,8) default NULL,
longitude decimal(11,8) default NULL,
title varchar(120) NOT NULL DEFAULT '',
path_segment varchar(80) DEFAULT '' NOT NULL,
image int(11) unsigned NOT NULL DEFAULT '0',
rel_marker int(11) NOT NULL DEFAULT '0',
popup_content text NOT NULL DEFAULT '',
addressline varchar(100) DEFAULT '' NOT NULL,
zip varchar(11) DEFAULT '' NOT NULL,
city varchar(50) DEFAULT '' NOT NULL,
region varchar(50) DEFAULT '' NOT NULL,
nav_to_url varchar(500) DEFAULT '' NOT NULL
);
CREATE TABLE tx_a2gmaps_domain_model_marker (
title varchar(120) DEFAULT '' NOT NULL,
map_icon int(11) unsigned NOT NULL DEFAULT '0',
rel_map_entry int(11) NOT NULL DEFAULT '0'
);