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'] = '© OpenStreetMap 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']; } }