mirror of
https://github.com/netzmacht/contao-leaflet-maps.git
synced 2025-11-28 19:13:55 +01:00
Compare commits
94 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2d47186d26 | ||
|
|
512ecef899 | ||
|
|
06400f9d1a | ||
|
|
b346efeb0a | ||
|
|
dd23a1594e | ||
|
|
ae800257d8 | ||
|
|
35e86ec1b9 | ||
|
|
a2d1ae683d | ||
|
|
91ba3ebf04 | ||
|
|
8ab3cf286c | ||
|
|
ec30f4b4b9 | ||
|
|
fd54d739d7 | ||
|
|
44546e4952 | ||
|
|
9814ed31ad | ||
|
|
bfa70d9f21 | ||
|
|
ff6aae3a6e | ||
|
|
c4980c481d | ||
|
|
d0b9e7cf10 | ||
|
|
097cd5c31f | ||
|
|
c01610271c | ||
|
|
bcb68af234 | ||
|
|
0e491fcc6a | ||
|
|
ea293e327f | ||
|
|
18f1cb5756 | ||
|
|
e38e926891 | ||
|
|
700a87bd1f | ||
|
|
94ecdf9d42 | ||
|
|
9434302a16 | ||
|
|
b79a75ac21 | ||
|
|
d498903645 | ||
|
|
c544202ca8 | ||
|
|
93f176a738 | ||
|
|
852b926252 | ||
|
|
87bd720d6e | ||
|
|
3f2020b0d1 | ||
|
|
e9b0d6156f | ||
|
|
e8f1fa2485 | ||
|
|
791eebaddb | ||
|
|
2ed1000d4d | ||
|
|
4e52e31937 | ||
|
|
ef8b6d294d | ||
|
|
445729acfe | ||
|
|
d6a7e14a05 | ||
|
|
bd0eb5a416 | ||
|
|
664ce11831 | ||
|
|
8a752b1955 | ||
|
|
f2584d400c | ||
|
|
60e285c673 | ||
|
|
49f3b7dbcd | ||
|
|
89d83ab8e0 | ||
|
|
141bb0f7b1 | ||
|
|
457bb612ef | ||
|
|
118bb9a829 | ||
|
|
e49c74c546 | ||
|
|
6054def7aa | ||
|
|
86026a473b | ||
|
|
90c4621918 | ||
|
|
e5263a6315 | ||
|
|
515a191a66 | ||
|
|
f2f7e87fd3 | ||
|
|
4198b2b6cd | ||
|
|
fbd1ef81b0 | ||
|
|
92a376a307 | ||
|
|
bf6a1f9db0 | ||
|
|
c523aed70d | ||
|
|
4795767a8b | ||
|
|
c0efdb058e | ||
|
|
a4547ffb17 | ||
|
|
a63c836535 | ||
|
|
711b06c6d3 | ||
|
|
70b7d0ab9c | ||
|
|
ea59841d6e | ||
|
|
64c332bc25 | ||
|
|
3db5aad6d3 | ||
|
|
cef9d7ff44 | ||
|
|
06dd3655c0 | ||
|
|
3b066dfeb7 | ||
|
|
697e8d2f5e | ||
|
|
a6c08ae8e5 | ||
|
|
bb8f9e42dc | ||
|
|
3be5da9176 | ||
|
|
55e4ed0702 | ||
|
|
d42e0e122f | ||
|
|
ac05d103f1 | ||
|
|
cc9990cf4d | ||
|
|
9643b2c196 | ||
|
|
4d55b012fd | ||
|
|
39a7207e23 | ||
|
|
c4feeb1b38 | ||
|
|
cb3e9bc8b4 | ||
|
|
6a88ed380b | ||
|
|
59e671f8ea | ||
|
|
b0df34b86e | ||
|
|
4ea2adbb85 |
@@ -6,6 +6,10 @@
|
||||
"array_insert",
|
||||
"Contao\\ManagerPlugin\\Bundle\\BundlePluginInterface",
|
||||
"Contao\\ManagerPlugin\\Bundle\\Config\\BundleConfig",
|
||||
"Contao\\ManagerPlugin\\Bundle\\Parser\\ParserInterface"
|
||||
"Contao\\ManagerPlugin\\Bundle\\Parser\\ParserInterface",
|
||||
"Contao\\ManagerPlugin\\Routing\\RoutingPluginInterface",
|
||||
"Hofff\\Contao\\Consent\\Bridge\\Bridge",
|
||||
"Hofff\\Contao\\Consent\\Bridge\\Plugin",
|
||||
"Hofff\\Contao\\Consent\\Bridge\\Render\\RenderInformation"
|
||||
]
|
||||
}
|
||||
|
||||
1
.github/FUNDING.yml
vendored
Normal file
1
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
github: [dmolineus]
|
||||
82
.github/workflows/diagnostics.yml
vendored
Normal file
82
.github/workflows/diagnostics.yml
vendored
Normal file
@@ -0,0 +1,82 @@
|
||||
name: Code Quality Diagnostics
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
name: PHP ${{ matrix.php }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- php: 7.4
|
||||
output: '-o github-action -o default'
|
||||
phpcq_install: 'install'
|
||||
- php: 8.0
|
||||
output: '-o default'
|
||||
phpcq_install: 'update'
|
||||
- php: 8.1
|
||||
output: '-o default'
|
||||
phpcq_install: 'update'
|
||||
- php: 8.2
|
||||
output: '-o default'
|
||||
phpcq_install: 'update'
|
||||
|
||||
steps:
|
||||
- name: Pull source
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Setup PHP with PECL extension
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php }}
|
||||
|
||||
- name: Cache composer cache directory
|
||||
uses: actions/cache@v1
|
||||
env:
|
||||
cache-name: composer-cache-dir
|
||||
with:
|
||||
path: ~/.cache/composer
|
||||
key: ${{ runner.os }}-${{ matrix.php }}-build-${{ env.cache-name }}
|
||||
|
||||
- name: Cache vendor directory
|
||||
uses: actions/cache@v1
|
||||
env:
|
||||
cache-name: vendor
|
||||
with:
|
||||
path: vendor
|
||||
key: ${{ runner.os }}-${{ matrix.php }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-${{ matrix.php }}-build-${{ env.cache-name }}-
|
||||
|
||||
- name: Cache phpcq directory
|
||||
uses: actions/cache@v1
|
||||
env:
|
||||
cache-name: phpcq
|
||||
with:
|
||||
path: .phpcq
|
||||
key: ${{ runner.os }}-${{ matrix.php }}-build-${{ env.cache-name }}-${{ hashFiles('**/.phpcq.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-${{ matrix.php }}-build-${{ env.cache-name }}-
|
||||
|
||||
- name: Install composer dependencies
|
||||
run: composer install
|
||||
- name: Install phpcq toolchain
|
||||
run: ./vendor/bin/phpcq ${{ matrix.phpcq_install }} -v
|
||||
|
||||
- name: Run tests
|
||||
run: ./vendor/bin/phpcq run -v ${{ matrix.output }}
|
||||
|
||||
- name: Upload build directory to artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
if: ${{ success() }} || ${{ failure() }}
|
||||
with:
|
||||
name: phpcq-builds-php-${{ matrix.php }}
|
||||
path: .phpcq/build/
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -25,3 +25,6 @@ build.properties
|
||||
|
||||
# NPM
|
||||
node_modules
|
||||
|
||||
.phpcq
|
||||
phpcq.yaml
|
||||
|
||||
1
.phpcq.lock
Normal file
1
.phpcq.lock
Normal file
File diff suppressed because one or more lines are too long
29
.travis.yml
29
.travis.yml
@@ -1,29 +0,0 @@
|
||||
language: php
|
||||
|
||||
php:
|
||||
- "7.1"
|
||||
- "7.2"
|
||||
|
||||
env:
|
||||
- CONTAO_VERSION=contao/core-bundle ~4.4.0
|
||||
- CONTAO_VERSION=contao/core-bundle ~4.5.0
|
||||
- CONTAO_VERSION=contao/core-bundle ~4.6.0
|
||||
|
||||
matrix:
|
||||
exclude:
|
||||
|
||||
sudo: false
|
||||
|
||||
install:
|
||||
- travis_retry composer self-update && composer --version
|
||||
- travis_retry composer require $CONTAO_VERSION --no-update
|
||||
- travis_retry composer update --prefer-dist --no-interaction
|
||||
|
||||
script: ant -keep-going
|
||||
|
||||
git:
|
||||
depth: 2147483647
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- vendor
|
||||
137
CHANGELOG.md
137
CHANGELOG.md
@@ -6,9 +6,92 @@ All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## 3.1.2 - TBD
|
||||
## [Unreleased]
|
||||
|
||||
[Full Changelog](https://github.com/netzmacht/contao-leaflet-maps/compare/3.1.1...hotfix/3.1.2)
|
||||
## [3.2.4] - 2023-02-20
|
||||
|
||||
### Fixed
|
||||
|
||||
- Load after `netzmacht-contao-leaflet-libraries` ([#116](https://github.com/netzmacht/contao-leaflet-maps/pull/116, [#120](https://github.com/netzmacht/contao-leaflet-maps/pull/120, [#121](https://github.com/netzmacht/contao-leaflet-maps/issues/121), [#122](https://github.com/netzmacht/contao-leaflet-maps/issues/122))
|
||||
- Do not use `doctrine/cache` anymore ([#118](https://github.com/netzmacht/contao-leaflet-maps/pull/118))
|
||||
- Fix issues of js generation in debug mode ([#114](https://github.com/netzmacht/contao-leaflet-maps/issues/114))
|
||||
|
||||
## [3.2.3] - 2022-02-22
|
||||
|
||||
### Changed
|
||||
|
||||
- Support symfony 5 (Contao 4.13 support) ([#110](https://github.com/netzmacht/contao-leaflet-maps/issues/110))
|
||||
- Support doctrine/dbal 3 (Contao 4.13 support) ([#110](https://github.com/netzmacht/contao-leaflet-maps/issues/110))
|
||||
- Fix missing icon in backend navigation ([#101](https://github.com/netzmacht/contao-leaflet-maps/issues/101))
|
||||
- Fix empty help wizard ([#99](https://github.com/netzmacht/contao-leaflet-maps/issues/99))
|
||||
- Update leaflet providers ([111](https://github.com/netzmacht/contao-leaflet-maps/issues/111), [102](https://github.com/netzmacht/contao-leaflet-maps/issues/102))
|
||||
- Fix tile layer implementation ([#108](https://github.com/netzmacht/contao-leaflet-maps/issues/108))
|
||||
- Fix access to tile layer fields ([#107](https://github.com/netzmacht/contao-leaflet-maps/issues/107))
|
||||
- Fix nexted folder structure ([#97](https://github.com/netzmacht/contao-leaflet-maps/issues/97))
|
||||
|
||||
## [3.2.2] - 2020-12-18
|
||||
|
||||
### Fixed
|
||||
|
||||
- Remove template debug placeholders, it breaks generated javascript ([#93](https://github.com/netzmacht/contao-leaflet-maps/issues/93))
|
||||
- Generate absolute urls for file layers ([#92](https://github.com/netzmacht/contao-leaflet-maps/issues/92))
|
||||
|
||||
## [3.2.1] - 2020-09-02
|
||||
|
||||
### Fixed
|
||||
|
||||
- Do not append javascript to the body anymore as consent tools might interrupt rendering
|
||||
|
||||
## [3.2.0] - 2020-08-28
|
||||
|
||||
### Added
|
||||
|
||||
- Add support for consent tools based on `hofff/contao-consent-bridge`
|
||||
|
||||
## [3.1.7] - 2020-08-28
|
||||
|
||||
### Fixed
|
||||
|
||||
- Duplicate map layer relations ([#89](https://github.com/netzmacht/contao-leaflet-maps/issues/89))
|
||||
|
||||
## [3.1.6] - 2020-01-03
|
||||
|
||||
### Fixed
|
||||
|
||||
- Do not add options which value is `NULL`
|
||||
- Fix button labels ([#83](https://github.com/netzmacht/contao-leaflet-maps/issues/83))
|
||||
- Fix potential security issue of symfony/dependency-injection (https://github.com/advisories/GHSA-pgwj-prpq-jpc2)
|
||||
|
||||
### Changed
|
||||
|
||||
- Use relative path for backend icon ([#82](https://github.com/netzmacht/contao-leaflet-maps/issues/82))
|
||||
|
||||
|
||||
## [3.1.5] - 2019-08-26
|
||||
|
||||
### Fixed
|
||||
|
||||
- Use twig directly instead of templating component to restore Contao 4.8
|
||||
|
||||
## [3.1.4] - 2019-02-13
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix ordering changes in layer control element aren't recognized ([#72](https://github.com/netzmacht/contao-leaflet-maps/issues/72))
|
||||
- Fix markers with negative coordinates aren't displayed ([#74](https://github.com/netzmacht/contao-leaflet-maps/issues/74))
|
||||
- Fix image icon with non existing image throws exception ([#75](https://github.com/netzmacht/contao-leaflet-maps/issues/75))
|
||||
- Fix invalid alias then using multiple edit. Aliases aren't copied anymore. ([#71](https://github.com/netzmacht/contao-leaflet-maps/issues/71))
|
||||
|
||||
## [3.1.3] - 2019-01-10
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix broken api routes in Contao 4.6/Symfony 4 (#69)
|
||||
- Fix broken about.html.twig template. Error block was missing
|
||||
|
||||
## 3.1.2 - 2018-12-18
|
||||
|
||||
[Full Changelog](https://github.com/netzmacht/contao-leaflet-maps/compare/3.1.1...3.1.2)
|
||||
|
||||
### Fixed
|
||||
|
||||
@@ -29,9 +112,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- Add missing GeoportailFrance of leaflet-providers
|
||||
- Add missing OneMapSG of leaflet-providers
|
||||
|
||||
## 3.1.1 - 2018-12-07
|
||||
|
||||
[Full Changelog](https://github.com/netzmacht/contao-leaflet-maps/compare/3.1.0...3.1.1)
|
||||
## [3.1.1] - 2018-12-07
|
||||
|
||||
### Fixed
|
||||
|
||||
@@ -65,43 +146,31 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- Fix broken marker cluster layer (#60).
|
||||
|
||||
|
||||
## 3.0.4 - 2018-10-08
|
||||
|
||||
[Full Changelog](https://github.com/netzmacht/contao-leaflet-maps/compare/3.0.3...3.0.4)
|
||||
## [3.0.4] - 2018-10-08
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix broken content element attributes (Missing class and custom id).
|
||||
|
||||
## 3.0.3 - 2018-09-18
|
||||
|
||||
[Full Changelog](https://github.com/netzmacht/contao-leaflet-maps/compare/3.0.2...3.0.3)
|
||||
## [3.0.3] - 2018-09-18
|
||||
|
||||
### Fixed
|
||||
|
||||
- Make alias generator services public for Contao 4.6/Symfony 4.0 compatibility.
|
||||
|
||||
## 3.0.2 - 2018-08-23
|
||||
|
||||
[Full Changelog](https://github.com/netzmacht/contao-leaflet-maps/compare/3.0.1...3.0.2)
|
||||
## [3.0.2] - 2018-08-23
|
||||
|
||||
- Run composer require checker and solve issues.
|
||||
|
||||
## 3.0.1 - 2018-06-20
|
||||
|
||||
[Full Changelog](https://github.com/netzmacht/contao-leaflet-maps/compare/3.0.0...3.0.1)
|
||||
## [3.0.1] - 2018-06-20
|
||||
|
||||
- Fix broken dynamic bbox related data loading (#57)
|
||||
|
||||
## 3.0.0 - 2018-01-05
|
||||
|
||||
[Full Changelog](https://github.com/netzmacht/contao-leaflet-maps/compare/3.0.0-beta1...3.0.0)
|
||||
## [3.0.0] - 2018-01-05
|
||||
|
||||
- Make hook/dca listener services public
|
||||
|
||||
## 3.0.0-beta1 - 2017-11-15
|
||||
|
||||
[Full Changelog](https://github.com/netzmacht/contao-leaflet-maps/compare/3.0.0-alpha2...3.0.0-beta1)
|
||||
## [3.0.0-beta1] - 2017-11-15
|
||||
|
||||
Enhancements
|
||||
|
||||
@@ -112,9 +181,7 @@ Bugfixes
|
||||
- Broken service definitions
|
||||
- Broken file layer id
|
||||
|
||||
## 3.0.0-alpha1 - 2017-10-19
|
||||
|
||||
[Full Changelog](https://github.com/netzmacht/contao-leaflet-maps/compare/3.0.0-alpha1...3.0.0-alpha2)
|
||||
## [3.0.0-alpha2] - 2017-10-19
|
||||
|
||||
Implemented enhancements
|
||||
|
||||
@@ -123,3 +190,21 @@ Implemented enhancements
|
||||
- New file layer for gpx,kml,wkt,topojson,geojson files added
|
||||
- Bypass filesystem cache in debug mode
|
||||
- Changelog added
|
||||
|
||||
[Unreleased]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.2.2...hotfix/3.2.3
|
||||
[3.2.2]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.2.1...3.2.2
|
||||
[3.2.1]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.2.0...3.2.1
|
||||
[3.2.0]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.1.7...3.2.0
|
||||
[3.1.7]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.1.6...3.1.7
|
||||
[3.1.6]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.1.5...3.1.6
|
||||
[3.1.5]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.1.4...3.1.5
|
||||
[3.1.4]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.1.3...3.1.4
|
||||
[3.1.3]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.1.2...3.1.3
|
||||
[3.1.1]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.1.0...3.1.1
|
||||
[3.0.4]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.0.3...3.0.4
|
||||
[3.0.3]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.0.2...3.0.3
|
||||
[3.0.2]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.0.1...3.0.2
|
||||
[3.0.1]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.0.0...3.0.1
|
||||
[3.0.0]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.0.0-beta1...3.0.0
|
||||
[3.0.0-beta1]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.0.0-alpha2...3.0.0-beta1
|
||||
[3.0-0-alpha2]: https://github.com/netzmacht/contao-leaflet-maps/compare/3.0.0-alpha1...3.0.0-alpha2
|
||||
|
||||
12
README.md
12
README.md
@@ -2,9 +2,9 @@ Leaflet integration into Contao CMS
|
||||
===================================
|
||||
|
||||
[](https://travis-ci.org/netzmacht/contao-leaflet-maps)
|
||||
[](http://packagist.com/packages/netzmacht/contao-leaflet-maps)
|
||||
[](http://packagist.com/packages/netzmacht/contao-leaflet-maps)
|
||||
[](http://packagist.com/packages/netzmacht/contao-leaflet-maps)
|
||||
[](http://packagist.org/packages/netzmacht/contao-leaflet-maps)
|
||||
[](http://packagist.org/packages/netzmacht/contao-leaflet-maps)
|
||||
[](http://packagist.org/packages/netzmacht/contao-leaflet-maps)
|
||||
[](https://github.com/contao-community-alliance/coding-standard)
|
||||
|
||||
This extension provides a backend gui for integrating [Leaflet](http://leafletjs.com/) into the Contao CMS.
|
||||
@@ -38,6 +38,12 @@ Features
|
||||
- Autoloading of required assets.
|
||||
- [Layer for MetaModels](https://github.com/netzmacht/contao-leaflet-metamodels)
|
||||
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
||||
A basic [user documentation](http://leaflet-maps-for-contao.readthedocs.org/) written in German is available.
|
||||
|
||||
Changelog
|
||||
---------
|
||||
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
phpcs.standard = ${basedir}/vendor/phpcq/coding-standard/phpcs/PhpCodeQuality/ruleset.xml
|
||||
phpmd.ruleset = ${basedir}/vendor/phpcq/coding-standard/phpmd/ruleset.xml
|
||||
phpcs.excluded = src/Bundle/Resources/contao/languages,src/Bundle/Resources/public/js
|
||||
phpcpd.excluded = contao
|
||||
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project name="netzmacht/contao-leaflet-maps" default="build">
|
||||
<!-- import the main build system -->
|
||||
<import file="vendor/phpcq/phpcq/phpcq.main.xml" />
|
||||
</project>
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"name": "netzmacht/contao-leaflet-maps",
|
||||
"description": "Contao Leaflet maps integration",
|
||||
"license": "LGPL-3.0-or-later",
|
||||
"type": "contao-bundle",
|
||||
"keywords": [
|
||||
"contao",
|
||||
"maps",
|
||||
"leaflet"
|
||||
],
|
||||
"type": "contao-bundle",
|
||||
"license": "LGPL-3.0-or-later",
|
||||
"authors": [
|
||||
{
|
||||
"name": "David Molineus",
|
||||
@@ -19,60 +19,73 @@
|
||||
"support": {
|
||||
"email": "mail@netzmacht.de",
|
||||
"issues": "https://github.com/netzmacht/contao-leaflet-maps/issues",
|
||||
"source": "https://github.com/netzmacht/contao-leaflet-maps"
|
||||
"source": "https://github.com/netzmacht/contao-leaflet-maps",
|
||||
"docs": "http://leaflet-maps-for-contao.readthedocs.org/"
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.1",
|
||||
"php": "^7.1 || ^8.0",
|
||||
"ext-json": "*",
|
||||
"ext-pdo": "*",
|
||||
"contao/core-bundle": "~4.4",
|
||||
"doctrine/dbal": "^2.5",
|
||||
"symfony/config": "~3.3 || ~4.0",
|
||||
"symfony/event-dispatcher": "~3.3 || ~4.0",
|
||||
"symfony/dependency-injection": "~3.3 || ~4.0",
|
||||
"symfony/filesystem": "~3.3 || ~4.0",
|
||||
"symfony/http-kernel": "~3.3 || ~4.0",
|
||||
"symfony/translation": "~3.3 || ~4.0",
|
||||
"symfony/templating": "~3.3 || ~4.0",
|
||||
"netzmacht/contao-leaflet-libraries": "^1.3.4",
|
||||
"contao-community-alliance/meta-palettes": "^2.0",
|
||||
"contao/core-bundle": "^4.9",
|
||||
"doctrine/dbal": "^2.11 || ^3.0",
|
||||
"menatwork/contao-multicolumnwizard-bundle": "^3.4",
|
||||
"netzmacht/contao-leaflet-geocode-widget": "^1.2",
|
||||
"netzmacht/contao-leaflet-libraries": "^1.7.1.1",
|
||||
"netzmacht/contao-page-context": "~1.0",
|
||||
"netzmacht/contao-toolkit": "^3.7",
|
||||
"netzmacht/php-javascript-builder": "^1.0",
|
||||
"netzmacht/php-leaflet": "^1.1.0",
|
||||
"netzmacht/contao-toolkit": "~3.0",
|
||||
"netzmacht/contao-page-context": "~1.0",
|
||||
"contao-community-alliance/meta-palettes": "^2.0 || ^1.5",
|
||||
"menatwork/contao-multicolumnwizard": "^3.2",
|
||||
"doctrine/cache": "^1.0"
|
||||
"symfony/cache-contracts": "^1.1 || ^2.0",
|
||||
"symfony/config": "^4.4 || ^5.1",
|
||||
"symfony/dependency-injection": "^4.4 || ^5.1",
|
||||
"symfony/event-dispatcher": "^4.4 || ^5.1",
|
||||
"symfony/event-dispatcher-contracts": "^1.1 || ^2.0",
|
||||
"symfony/filesystem": "^4.4 || ^5.1",
|
||||
"symfony/http-foundation": "^4.4 || ^5.1",
|
||||
"symfony/http-kernel": "^4.4 || ^5.1",
|
||||
"symfony/routing": "^4.4 || ^5.1",
|
||||
"symfony/templating": "^4.4 || ^5.1 || ^6.2",
|
||||
"symfony/translation-contracts": "^1.1 || ^2.0",
|
||||
"symfony/twig-bundle": "^4.4 || ^5.1",
|
||||
"twig/twig": "^2.0 || ^3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpcq/all-tasks": "^1.2",
|
||||
"contao/manager-plugin": "^2.1",
|
||||
"phpstan/phpstan": "^0.10.3"
|
||||
"hofff/contao-consent-bridge": "^1.0",
|
||||
"phpcq/coding-standard": "^2.1",
|
||||
"phpcq/runner-bootstrap": "^1.0@dev"
|
||||
},
|
||||
"conflict": {
|
||||
"hofff/contao-consent-bridge": "<1.0 || >= 2.0"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Netzmacht\\Contao\\Leaflet\\": "src/"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"files": [
|
||||
"vendor/phpcq/autoload-validation/hacks/contao-hack.php"
|
||||
]
|
||||
"config": {
|
||||
"allow-plugins": {
|
||||
"contao-components/installer": true,
|
||||
"contao/manager-plugin": true,
|
||||
"contao-community-alliance/composer-plugin": true,
|
||||
"php-http/discovery": true
|
||||
}
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.1.x-dev",
|
||||
"dev-develop": "3.2.x-dev",
|
||||
"dev-develop": "3.3.x-dev",
|
||||
"dev-master": "3.2.x-dev",
|
||||
"dev-support/2.x": "2.0.x-dev"
|
||||
},
|
||||
"contao-manager-plugin": "Netzmacht\\Contao\\Leaflet\\Bundle\\ContaoManager\\Plugin",
|
||||
"contao": {
|
||||
"transifex": {
|
||||
"project": "contao-leaflet-maps",
|
||||
"prefix": "core-",
|
||||
"languages_cto": "src/Bundle/Resources/contao/languages",
|
||||
"languages_tx": ".tx"
|
||||
}
|
||||
}
|
||||
"languages_tx": ".tx",
|
||||
"prefix": "core-",
|
||||
"project": "contao-leaflet-maps"
|
||||
}
|
||||
},
|
||||
"contao-manager-plugin": "Netzmacht\\Contao\\Leaflet\\Bundle\\ContaoManager\\Plugin"
|
||||
}
|
||||
}
|
||||
|
||||
1349
package-lock.json
generated
1349
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -4,10 +4,10 @@
|
||||
"description": "Leaflet maps for Contao",
|
||||
"main": "gulpfile.js",
|
||||
"dependencies": {
|
||||
"gulp": "^4.0.0",
|
||||
"gulp-cli": "^2.0.1",
|
||||
"gulp": "^4.0.2",
|
||||
"gulp-cli": "^2.2.0",
|
||||
"gulp-concat": "^2.6.1",
|
||||
"gulp-uglify": "^3.0.1",
|
||||
"gulp-uglify": "^3.0.2",
|
||||
"promised-del": "^1.0.2"
|
||||
},
|
||||
"devDependencies": {},
|
||||
|
||||
98
phpcq.yaml.dist
Normal file
98
phpcq.yaml.dist
Normal file
@@ -0,0 +1,98 @@
|
||||
phpcq:
|
||||
repositories:
|
||||
- https://phpcq.github.io/repository/repository.json
|
||||
directories:
|
||||
- src
|
||||
|
||||
plugins:
|
||||
composer-require-checker:
|
||||
version: ^1.0
|
||||
signed: false
|
||||
phpmd:
|
||||
version: ^1.0
|
||||
signed: false
|
||||
requirements:
|
||||
phpmd:
|
||||
signed: false
|
||||
phpcpd:
|
||||
version: ^1.1
|
||||
signed: false
|
||||
phploc:
|
||||
version: ^1.0
|
||||
signed: false
|
||||
phpcs:
|
||||
version: ^1.0
|
||||
signed: false
|
||||
composer-normalize:
|
||||
version: ^1.0
|
||||
signed: false
|
||||
|
||||
trusted-keys:
|
||||
# composer require checker
|
||||
- 033E5F8D801A2F8D
|
||||
# sb@sebastian-bergmann.de
|
||||
- 4AA394086372C20A
|
||||
# magl@magll.net
|
||||
- D2CCAC42F6295E7D
|
||||
# PHP_CodeSniffer
|
||||
- 31C7E470E2138192
|
||||
# Composer normalize
|
||||
- C00543248C87FB13
|
||||
# phpmd
|
||||
- A4E55EA12C7C085C
|
||||
|
||||
tasks:
|
||||
fix:
|
||||
- composer-normalize-fix
|
||||
- phpcbf
|
||||
|
||||
verify:
|
||||
- composer-require-checker
|
||||
- composer-normalize
|
||||
|
||||
analyze:
|
||||
- phploc
|
||||
- phpcpd
|
||||
- phpmd
|
||||
- phpcs
|
||||
|
||||
default:
|
||||
- verify
|
||||
- analyze
|
||||
|
||||
phpcpd:
|
||||
plugin: phpcpd
|
||||
|
||||
phpmd:
|
||||
config:
|
||||
ruleset:
|
||||
- vendor/phpcq/coding-standard/phpmd/ruleset.xml
|
||||
|
||||
composer-normalize:
|
||||
config:
|
||||
ignore_output:
|
||||
- '#Root package is not of type "project", we will not installing Contao extensions\.#'
|
||||
|
||||
composer-require-checker:
|
||||
plugin: composer-require-checker
|
||||
config:
|
||||
config_file: '.composer-require-checker.json'
|
||||
|
||||
phpcs:
|
||||
plugin: phpcs
|
||||
config: &phpcs-config
|
||||
standard: ~
|
||||
excluded:
|
||||
- src/Bundle/Resources/contao/languages
|
||||
- src/Bundle/Resources/public/js
|
||||
|
||||
phpcbf:
|
||||
plugin: phpcs
|
||||
config:
|
||||
<<: *phpcs-config
|
||||
fix: true
|
||||
|
||||
composer-normalize-fix:
|
||||
plugin: composer-normalize
|
||||
config:
|
||||
dry_run: false
|
||||
4
phpcs.xml.dist
Normal file
4
phpcs.xml.dist
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ruleset name="ContaoToolkit">
|
||||
<rule ref="vendor/phpcq/coding-standard/phpcs/PhpCodeQuality/ruleset.xml" />
|
||||
</ruleset>
|
||||
@@ -5,15 +5,15 @@
|
||||
*
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2014-2017 netzmacht David Molineus. All rights reserved.
|
||||
* @copyright 2014-2019 netzmacht David Molineus. All rights reserved.
|
||||
* @license LGPL-3.0 https://github.com/netzmacht/contao-leaflet-maps/blob/master/LICENSE
|
||||
* @filesource
|
||||
*/
|
||||
|
||||
namespace Netzmacht\Contao\Leaflet\Backend\Action;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Templating\EngineInterface as Engine;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Twig\Environment;
|
||||
|
||||
/**
|
||||
* Credits backend module.
|
||||
@@ -23,11 +23,11 @@ use Symfony\Component\HttpFoundation\Response;
|
||||
final class AboutAction
|
||||
{
|
||||
/**
|
||||
* Templating engine.
|
||||
* Twig environment.
|
||||
*
|
||||
* @var Engine
|
||||
* @var Environment
|
||||
*/
|
||||
private $engine;
|
||||
private $twig;
|
||||
|
||||
/**
|
||||
* Project directory.
|
||||
@@ -39,12 +39,12 @@ final class AboutAction
|
||||
/**
|
||||
* AboutAction constructor.
|
||||
*
|
||||
* @param Engine $engine Templating engine.
|
||||
* @param Environment $twig Twig environment.
|
||||
* @param string $projectDir Project directory.
|
||||
*/
|
||||
public function __construct(Engine $engine, string $projectDir)
|
||||
public function __construct(Environment $twig, string $projectDir)
|
||||
{
|
||||
$this->engine = $engine;
|
||||
$this->twig = $twig;
|
||||
$this->projectDir = $projectDir;
|
||||
}
|
||||
|
||||
@@ -62,7 +62,9 @@ final class AboutAction
|
||||
|
||||
[$data['version'], $data['dependencies']] = $this->extractFromComposer();
|
||||
|
||||
return $this->engine->renderResponse('@NetzmachtContaoLeaflet/backend/about.html.twig', $data);
|
||||
return new Response(
|
||||
$this->twig->render('@NetzmachtContaoLeaflet/backend/about.html.twig', $data)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -14,7 +14,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace Netzmacht\Contao\Leaflet\Backend\Renderer\Label\Layer;
|
||||
|
||||
use Symfony\Component\Translation\TranslatorInterface as Translator;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface as Translator;
|
||||
|
||||
/**
|
||||
* Class ChainRenderer.
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace Netzmacht\Contao\Leaflet\Backend\Renderer\Label\Layer;
|
||||
|
||||
use Contao\FilesModel;
|
||||
use Netzmacht\Contao\Toolkit\Data\Model\RepositoryManager;
|
||||
use Symfony\Component\Translation\TranslatorInterface as Translator;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface as Translator;
|
||||
|
||||
/**
|
||||
* Class FileLabelRenderer
|
||||
|
||||
@@ -14,7 +14,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace Netzmacht\Contao\Leaflet\Backend\Renderer\Label\Layer;
|
||||
|
||||
use Symfony\Component\Translation\TranslatorInterface as Translator;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface as Translator;
|
||||
|
||||
/**
|
||||
* Interface LayerLabelRenderer.
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace Netzmacht\Contao\Leaflet\Backend\Renderer\Label\Layer;
|
||||
|
||||
use Netzmacht\Contao\Leaflet\Model\MarkerModel;
|
||||
use Netzmacht\Contao\Toolkit\Data\Model\RepositoryManager;
|
||||
use Symfony\Component\Translation\TranslatorInterface as Translator;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface as Translator;
|
||||
|
||||
/**
|
||||
* Class MarkersLabelRenderer.
|
||||
|
||||
@@ -15,7 +15,7 @@ declare(strict_types=1);
|
||||
namespace Netzmacht\Contao\Leaflet\Backend\Renderer\Label\Layer;
|
||||
|
||||
use Contao\StringUtil;
|
||||
use Symfony\Component\Translation\TranslatorInterface as Translator;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface as Translator;
|
||||
|
||||
/**
|
||||
* Class OverpassLabelRenderer.
|
||||
|
||||
@@ -14,7 +14,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace Netzmacht\Contao\Leaflet\Backend\Renderer\Label\Layer;
|
||||
|
||||
use Symfony\Component\Translation\TranslatorInterface as Translator;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface as Translator;
|
||||
|
||||
/**
|
||||
* Backend label renderer for provider layer.
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace Netzmacht\Contao\Leaflet\Backend\Renderer\Label\Layer;
|
||||
|
||||
use Netzmacht\Contao\Leaflet\Model\LayerModel;
|
||||
use Netzmacht\Contao\Toolkit\Data\Model\RepositoryManager;
|
||||
use Symfony\Component\Translation\TranslatorInterface as Translator;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface as Translator;
|
||||
|
||||
/**
|
||||
* Class ReferenceLabelRenderer.
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace Netzmacht\Contao\Leaflet\Backend\Renderer\Label\Layer;
|
||||
|
||||
use Netzmacht\Contao\Leaflet\Model\VectorModel;
|
||||
use Netzmacht\Contao\Toolkit\Data\Model\RepositoryManager;
|
||||
use Symfony\Component\Translation\TranslatorInterface as Translator;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface as Translator;
|
||||
|
||||
/**
|
||||
* Class VectorsLabelRenderer.
|
||||
|
||||
37
src/Bundle/ConsentBridge/Plugin.php
Normal file
37
src/Bundle/ConsentBridge/Plugin.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Leaflet maps for Contao CMS.
|
||||
*
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2014-2017 netzmacht David Molineus. All rights reserved.
|
||||
* @license LGPL-3.0 https://github.com/netzmacht/contao-leaflet-maps/blob/master/LICENSE
|
||||
* @filesource
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Netzmacht\Contao\Leaflet\Bundle\ConsentBridge;
|
||||
|
||||
use Hofff\Contao\Consent\Bridge\Bridge;
|
||||
use Hofff\Contao\Consent\Bridge\Plugin as ConsentBridgePlugin;
|
||||
use Hofff\Contao\Consent\Bridge\Render\RenderInformation;
|
||||
|
||||
/**
|
||||
* Consent Bridge plugin for leaflet.
|
||||
*/
|
||||
final class Plugin implements ConsentBridgePlugin
|
||||
{
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function load(Bridge $bridge): void
|
||||
{
|
||||
$renderInformation = RenderInformation::autoRenderWithPlaceholder('leaflet_consent_bridge_placeholder');
|
||||
|
||||
$bridge
|
||||
->supportContentElement('leaflet', $renderInformation)
|
||||
->supportFrontendModule('leaflet', $renderInformation);
|
||||
}
|
||||
}
|
||||
@@ -44,7 +44,8 @@ class Plugin implements BundlePluginInterface, RoutingPluginInterface
|
||||
[
|
||||
ContaoCoreBundle::class,
|
||||
NetzmachtContaoToolkitBundle::class,
|
||||
NetzmachtContaoPageContextBundle::class
|
||||
NetzmachtContaoPageContextBundle::class,
|
||||
'leaflet-libs',
|
||||
]
|
||||
)
|
||||
->setReplace(['leaflet']),
|
||||
|
||||
@@ -18,6 +18,8 @@ use Netzmacht\LeafletPHP\Assets;
|
||||
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
|
||||
use function array_pad;
|
||||
|
||||
/**
|
||||
* Class RegisterLibrariesPass.
|
||||
*
|
||||
@@ -43,12 +45,12 @@ class RegisterLibrariesPass implements CompilerPassInterface
|
||||
|
||||
foreach ($libraries as $name => $assets) {
|
||||
if (!empty($assets['css'])) {
|
||||
list ($source, $type) = (array) $assets['css'];
|
||||
[$source, $type] = array_pad((array) $assets['css'], 2, null);
|
||||
$definition->addMethodCall('registerStylesheet', [$name, $source, $type ?: Assets::TYPE_FILE]);
|
||||
}
|
||||
|
||||
if (!empty($assets['javascript'])) {
|
||||
list ($source, $type) = (array) $assets['javascript'];
|
||||
[$source, $type] = array_pad((array) $assets['javascript'], 2, null);
|
||||
$definition->addMethodCall('registerJavascript', [$name, $source, $type ?: Assets::TYPE_FILE]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ services:
|
||||
public: true
|
||||
arguments:
|
||||
- '@netzmacht.contao_toolkit.repository_manager'
|
||||
- '@templating'
|
||||
- '@netzmacht.contao_toolkit.template_renderer'
|
||||
- '@filesystem'
|
||||
- '@netzmacht.contao_toolkit.contao.system_adapter'
|
||||
- '%netzmacht.contao_leaflet.cache_dir%'
|
||||
|
||||
@@ -77,6 +77,7 @@ services:
|
||||
class: Netzmacht\Contao\Leaflet\Mapper\Layer\FileLayerMapper
|
||||
arguments:
|
||||
- '@netzmacht.contao_toolkit.repository_manager'
|
||||
- '@netzmacht.contao_toolkit.contao.environment_adapter'
|
||||
tags:
|
||||
- { name: netzmacht.contao_leaflet.mapper }
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
parameters:
|
||||
netzmacht.contao_leaflet.providers:
|
||||
OpenStreetMap:
|
||||
variants: ['Mapnik', 'BlackAndWhite', 'DE', 'CH', 'France', 'HOT', 'BZH']
|
||||
variants: ['Mapnik', 'DE', 'CH', 'France', 'HOT', 'BZH']
|
||||
|
||||
OpenSeaMap: []
|
||||
|
||||
OpenTopoMap: []
|
||||
OPNVKarte: []
|
||||
|
||||
OpenPtMap: []
|
||||
OpenTopoMap: []
|
||||
|
||||
OpenRailwayMap: []
|
||||
|
||||
@@ -15,6 +15,9 @@ parameters:
|
||||
|
||||
SafeCast: []
|
||||
|
||||
Stadia:
|
||||
variants: ['AlidadeSmooth', 'AlidadeSmoothDark', 'OSMBright', 'Outdoors']
|
||||
|
||||
Thunderforest:
|
||||
class: 'Netzmacht\LeafletPHP\Plugins\LeafletProviders\ThunderforestProvider'
|
||||
variants:
|
||||
@@ -25,12 +28,13 @@ parameters:
|
||||
- 'Landscape'
|
||||
- 'Outdoors'
|
||||
- 'Pioneer'
|
||||
- 'MobileAtlas'
|
||||
- 'Neighbourhood'
|
||||
options:
|
||||
apiKey: 'tile_provider_key'
|
||||
fields: ['tile_provider_key']
|
||||
|
||||
OpenMapSurfer:
|
||||
variants: ['Roads', 'AdminBounds', 'Grayscale']
|
||||
CyclOSM: []
|
||||
|
||||
Hydda:
|
||||
variants: ['Full', 'Base', 'RoadsAndLabels']
|
||||
@@ -41,6 +45,8 @@ parameters:
|
||||
accessToken: 'tile_provider_key'
|
||||
fields: ['tile_provider_key']
|
||||
|
||||
MapTiler: []
|
||||
|
||||
Stamen:
|
||||
variants:
|
||||
- 'Toner'
|
||||
@@ -112,6 +118,7 @@ parameters:
|
||||
- 'hybridDayMobile'
|
||||
- 'hybridDayTransit'
|
||||
- 'hybridDayGrey'
|
||||
- 'hybridDayTraffic'
|
||||
- 'pedestrianDay'
|
||||
- 'pedestrianNight'
|
||||
- 'satelliteDay'
|
||||
|
||||
@@ -16,7 +16,7 @@ services:
|
||||
- '@netzmacht.contao_leaflet.cache'
|
||||
- '@netzmacht.contao_leaflet.frontend.data_controller'
|
||||
- '@netzmacht.contao_toolkit.repository_manager'
|
||||
- '@templating'
|
||||
- '@netzmacht.contao_toolkit.template_renderer'
|
||||
|
||||
netzmacht.contao_leaflet.libraries:
|
||||
class: Netzmacht\Contao\Leaflet\Frontend\Assets\LibrariesConfiguration
|
||||
@@ -29,12 +29,14 @@ services:
|
||||
- '%netzmacht.contao_leaflet.filters%'
|
||||
|
||||
netzmacht.contao_leaflet.cache.default:
|
||||
class: Doctrine\Common\Cache\FilesystemCache
|
||||
class: Symfony\Component\Cache\Adapter\FilesystemAdapter
|
||||
arguments:
|
||||
- 'netzmacht.contao_leaflet'
|
||||
- 0
|
||||
- '%netzmacht.contao_leaflet.cache_dir%'
|
||||
|
||||
netzmacht.contao_leaflet.cache.debug:
|
||||
class: Doctrine\Common\Cache\ArrayCache
|
||||
class: Symfony\Component\Cache\Adapter\ArrayAdapter
|
||||
|
||||
netzmacht.contao_leaflet.frontend.value_filter:
|
||||
class: Netzmacht\Contao\Leaflet\Frontend\ValueFilter
|
||||
@@ -128,11 +130,17 @@ services:
|
||||
- { name: Netzmacht\Contao\PageContext\Request\PageIdDeterminator }
|
||||
|
||||
Netzmacht\Contao\Leaflet\Frontend\Action\LayerDataAction:
|
||||
public: true
|
||||
arguments:
|
||||
- '@netzmacht.contao_leaflet.map.provider'
|
||||
- '@netzmacht.contao_leaflet.filter_factory'
|
||||
|
||||
Netzmacht\Contao\Leaflet\Backend\Action\AboutAction:
|
||||
public: true
|
||||
arguments:
|
||||
- '@templating'
|
||||
- '@twig'
|
||||
- '%kernel.project_dir%'
|
||||
|
||||
Netzmacht\Contao\Leaflet\Bundle\ConsentBridge\Plugin:
|
||||
tags:
|
||||
- { name: hofff_contao_consent_bridge.plugin }
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
*
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @author Fritz Michael Gschwantner <fmg@inspiredminds.at>
|
||||
* @copyright 2014-2017 netzmacht David Molineus. All rights reserved.
|
||||
* @license LGPL-3.0 https://github.com/netzmacht/contao-leaflet-maps/blob/master/LICENSE
|
||||
* @filesource
|
||||
@@ -13,7 +14,7 @@
|
||||
$GLOBALS['TL_DCA']['tl_content']['metapalettes']['leaflet'] = [
|
||||
'type' => ['type', 'headline'],
|
||||
'leaflet' => ['leaflet_map', 'leaflet_mapId', 'leaflet_width', 'leaflet_height'],
|
||||
'templates' => [':hide', 'customTpl', 'leaflet_template'],
|
||||
'template' => [':hide', 'customTpl', 'leaflet_template'],
|
||||
'protected' => [':hide', 'protected'],
|
||||
'expert' => [':hide', 'guests', 'cssID', 'space'],
|
||||
'invisible' => [':hide', 'invisible', 'start', 'start'],
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
*
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2014-2017 netzmacht David Molineus. All rights reserved.
|
||||
* @author Sven Baumann <baumann.sv@gmail.com>
|
||||
* @copyright 2014-2022 netzmacht David Molineus. All rights reserved.
|
||||
* @license LGPL-3.0 https://github.com/netzmacht/contao-leaflet-maps/blob/master/LICENSE
|
||||
* @filesource
|
||||
*/
|
||||
@@ -67,7 +68,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_control'] = [
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['delete'],
|
||||
'href' => 'act=delete',
|
||||
'icon' => 'delete.gif',
|
||||
'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm']
|
||||
'attributes' => 'onclick="if(!confirm(\'' . ($GLOBALS['TL_LANG']['MSC']['deleteConfirm'] ?? '')
|
||||
. '\'))return false;Backend.getScrollOffset()"',
|
||||
],
|
||||
'toggle' => [
|
||||
@@ -164,6 +165,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_control'] = [
|
||||
'maxlength' => 255,
|
||||
'tl_class' => 'w50',
|
||||
'nullIfEmpty' => true,
|
||||
'doNotCopy' => true,
|
||||
],
|
||||
'toolkit' => [
|
||||
'alias_generator' => [
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
*
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2014-2017 netzmacht David Molineus. All rights reserved.
|
||||
* @author Sven Baumann <baumann.sv@gmail.com>
|
||||
* @copyright 2014-2022 netzmacht David Molineus. All rights reserved.
|
||||
* @license LGPL-3.0 https://github.com/netzmacht/contao-leaflet-maps/blob/master/LICENSE
|
||||
* @filesource
|
||||
*/
|
||||
@@ -78,7 +79,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_icon'] = [
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['delete'],
|
||||
'href' => 'act=delete',
|
||||
'icon' => 'delete.gif',
|
||||
'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm']
|
||||
'attributes' => 'onclick="if(!confirm(\'' . ($GLOBALS['TL_LANG']['MSC']['deleteConfirm'] ?? '')
|
||||
. '\'))return false;Backend.getScrollOffset()"',
|
||||
],
|
||||
'toggle' => [
|
||||
@@ -179,7 +180,14 @@ $GLOBALS['TL_DCA']['tl_leaflet_icon'] = [
|
||||
['netzmacht.contao_toolkit.dca.listeners.alias_generator', 'handleSaveCallback'],
|
||||
['netzmacht.contao_leaflet.listeners.dca.validator', 'validateAlias'],
|
||||
],
|
||||
'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true],
|
||||
'eval' => [
|
||||
'mandatory' => false,
|
||||
'maxlength' => 255,
|
||||
'tl_class' => 'w50',
|
||||
'unique' => true,
|
||||
'doNotCopy' => true,
|
||||
'nullIfEmpty' => true,
|
||||
],
|
||||
'toolkit' => [
|
||||
'alias_generator' => [
|
||||
'factory' => 'netzmacht.contao_leaflet.definition.alias_generator.factory_default',
|
||||
|
||||
@@ -5,11 +5,14 @@
|
||||
*
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2014-2017 netzmacht David Molineus. All rights reserved.
|
||||
* @author Sven Baumann <baumann.sv@gmail.com>
|
||||
* @copyright 2014-2022 netzmacht David Molineus. All rights reserved.
|
||||
* @license LGPL-3.0 https://github.com/netzmacht/contao-leaflet-maps/blob/master/LICENSE
|
||||
* @filesource
|
||||
*/
|
||||
|
||||
\Contao\Controller::loadLanguageFile('leaflet');
|
||||
|
||||
$GLOBALS['TL_DCA']['tl_leaflet_layer'] = [
|
||||
'config' => [
|
||||
'dataContainer' => 'Table',
|
||||
@@ -71,6 +74,11 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = [
|
||||
'class' => 'header_edit_all',
|
||||
'attributes' => 'onclick="Backend.getScrollOffset();"',
|
||||
],
|
||||
'toggleNodes' => [
|
||||
'href' => 'ptg=all',
|
||||
'class' => 'header_toggle',
|
||||
'showOnSelect' => true,
|
||||
],
|
||||
],
|
||||
'operations' => [
|
||||
'markers' => [
|
||||
@@ -105,7 +113,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = [
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['delete'],
|
||||
'href' => 'act=delete',
|
||||
'icon' => 'delete.gif',
|
||||
'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm']
|
||||
'attributes' => 'onclick="if(!confirm(\'' . ($GLOBALS['TL_LANG']['MSC']['deleteConfirm'] ?? '')
|
||||
. '\'))return false;Backend.getScrollOffset()"',
|
||||
],
|
||||
'toggle' => [
|
||||
@@ -278,7 +286,14 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = [
|
||||
['netzmacht.contao_toolkit.dca.listeners.alias_generator', 'handleSaveCallback'],
|
||||
['netzmacht.contao_leaflet.listeners.dca.validator', 'validateAlias'],
|
||||
],
|
||||
'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true],
|
||||
'eval' => [
|
||||
'mandatory' => false,
|
||||
'maxlength' => 255,
|
||||
'tl_class' => 'w50',
|
||||
'unique' => true,
|
||||
'nullIfEmpty' => true,
|
||||
'doNotCopy' => true,
|
||||
],
|
||||
'toolkit' => [
|
||||
'alias_generator' => [
|
||||
'factory' => 'netzmacht.contao_leaflet.definition.alias_generator.factory_default',
|
||||
@@ -626,7 +641,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = [
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'default' => '',
|
||||
'eval' => ['maxlength' => 255, 'tl_class' => 'long', 'allowHtml' => true],
|
||||
'eval' => ['maxlength' => 255, 'tl_class' => 'clr long', 'allowHtml' => true],
|
||||
'sql' => "varchar(255) NOT NULL default ''",
|
||||
],
|
||||
'tms' => [
|
||||
|
||||
@@ -5,7 +5,9 @@
|
||||
*
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2014-2017 netzmacht David Molineus. All rights reserved.
|
||||
* @author Sven Baumann <baumann.sv@gmail.com>
|
||||
* @author Stefan Heimes <stefan_heimes@hotmail.com>
|
||||
* @copyright 2014-2022 netzmacht David Molineus. All rights reserved.
|
||||
* @license LGPL-3.0 https://github.com/netzmacht/contao-leaflet-maps/blob/master/LICENSE
|
||||
* @filesource
|
||||
*/
|
||||
@@ -28,6 +30,9 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = [
|
||||
'onsubmit_callback' => [
|
||||
['netzmacht.contao_leaflet.listeners.dca.leaflet', 'clearCache'],
|
||||
],
|
||||
'oncopy_callback' => [
|
||||
['netzmacht.contao_leaflet.listeners.dca.map', 'copyLayerRelations'],
|
||||
],
|
||||
],
|
||||
|
||||
'list' => [
|
||||
@@ -70,7 +75,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = [
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['delete'],
|
||||
'href' => 'act=delete',
|
||||
'icon' => 'delete.gif',
|
||||
'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm']
|
||||
'attributes' => 'onclick="if(!confirm(\'' . ($GLOBALS['TL_LANG']['MSC']['deleteConfirm'] ?? '')
|
||||
. '\'))return false;Backend.getScrollOffset()"',
|
||||
],
|
||||
'show' => [
|
||||
@@ -157,7 +162,14 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = [
|
||||
['netzmacht.contao_toolkit.dca.listeners.alias_generator', 'handleSaveCallback'],
|
||||
['netzmacht.contao_leaflet.listeners.dca.validator', 'validateAlias'],
|
||||
],
|
||||
'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true],
|
||||
'eval' => [
|
||||
'mandatory' => false,
|
||||
'maxlength' => 255,
|
||||
'tl_class' => 'w50',
|
||||
'unique' => true,
|
||||
'doNotCopy' => true,
|
||||
'nullIfEmpty' => true,
|
||||
],
|
||||
'toolkit' => [
|
||||
'alias_generator' => [
|
||||
'factory' => 'netzmacht.contao_leaflet.definition.alias_generator.factory_default',
|
||||
@@ -417,6 +429,8 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = [
|
||||
'inputType' => 'textarea',
|
||||
'eval' => [
|
||||
'tl_class' => 'clr lng',
|
||||
'preserveTags' => true,
|
||||
'decodeEntities' => true,
|
||||
'allowHtml' => true,
|
||||
'style' => 'min-height: 40px;',
|
||||
'rte' => 'ace|json',
|
||||
|
||||
@@ -5,7 +5,9 @@
|
||||
*
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2014-2017 netzmacht David Molineus. All rights reserved.
|
||||
* @author Sven Baumann <baumann.sv@gmail.com>
|
||||
* @author Stefan Heimes <stefan_heimes@hotmail.com>
|
||||
* @copyright 2014-2022 netzmacht David Molineus. All rights reserved.
|
||||
* @license LGPL-3.0 https://github.com/netzmacht/contao-leaflet-maps/blob/master/LICENSE
|
||||
* @filesource
|
||||
*/
|
||||
@@ -78,7 +80,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_marker'] = [
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['delete'],
|
||||
'href' => 'act=delete',
|
||||
'icon' => 'delete.gif',
|
||||
'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm']
|
||||
'attributes' => 'onclick="if(!confirm(\'' . ($GLOBALS['TL_LANG']['MSC']['deleteConfirm'] ?? '')
|
||||
. '\'))return false;Backend.getScrollOffset()"',
|
||||
],
|
||||
'toggle' => [
|
||||
@@ -160,7 +162,14 @@ $GLOBALS['TL_DCA']['tl_leaflet_marker'] = [
|
||||
['netzmacht.contao_toolkit.dca.listeners.alias_generator', 'handleSaveCallback'],
|
||||
['netzmacht.contao_leaflet.listeners.dca.validator', 'validateAlias'],
|
||||
],
|
||||
'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true],
|
||||
'eval' => [
|
||||
'mandatory' => false,
|
||||
'maxlength' => 255,
|
||||
'tl_class' => 'w50',
|
||||
'unique' => true,
|
||||
'doNotCopy' => true,
|
||||
'nullIfEmpty' => true,
|
||||
],
|
||||
'toolkit' => [
|
||||
'alias_generator' => [
|
||||
'factory' => 'netzmacht.contao_leaflet.definition.alias_generator.factory_default',
|
||||
@@ -332,6 +341,8 @@ $GLOBALS['TL_DCA']['tl_leaflet_marker'] = [
|
||||
'inputType' => 'textarea',
|
||||
'eval' => [
|
||||
'tl_class' => 'clr lng',
|
||||
'preserveTags' => true,
|
||||
'decodeEntities' => true,
|
||||
'allowHtml' => true,
|
||||
'style' => 'min-height: 40px;',
|
||||
'rte' => 'ace|json',
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
*
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2014-2017 netzmacht David Molineus. All rights reserved.
|
||||
* @author Sven Baumann <baumann.sv@gmail.com>
|
||||
* @copyright 2014-2022 netzmacht David Molineus. All rights reserved.
|
||||
* @license LGPL-3.0 https://github.com/netzmacht/contao-leaflet-maps/blob/master/LICENSE
|
||||
* @filesource
|
||||
*/
|
||||
@@ -78,7 +79,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_popup'] = [
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_popup']['delete'],
|
||||
'href' => 'act=delete',
|
||||
'icon' => 'delete.gif',
|
||||
'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm']
|
||||
'attributes' => 'onclick="if(!confirm(\'' . ($GLOBALS['TL_LANG']['MSC']['deleteConfirm'] ?? '')
|
||||
. '\'))return false;Backend.getScrollOffset()"',
|
||||
],
|
||||
'toggle' => [
|
||||
@@ -151,7 +152,14 @@ $GLOBALS['TL_DCA']['tl_leaflet_popup'] = [
|
||||
['netzmacht.contao_toolkit.dca.listeners.alias_generator', 'handleSaveCallback'],
|
||||
['netzmacht.contao_leaflet.listeners.dca.validator', 'validateAlias'],
|
||||
],
|
||||
'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true],
|
||||
'eval' => [
|
||||
'mandatory' => false,
|
||||
'maxlength' => 255,
|
||||
'tl_class' => 'w50',
|
||||
'unique' => true,
|
||||
'doNotCopy' => true,
|
||||
'nullIfEmpty' => true,
|
||||
],
|
||||
'toolkit' => [
|
||||
'alias_generator' => [
|
||||
'factory' => 'netzmacht.contao_leaflet.definition.alias_generator.factory_default',
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
*
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2014-2017 netzmacht David Molineus. All rights reserved.
|
||||
* @author Sven Baumann <baumann.sv@gmail.com>
|
||||
* @copyright 2014-2022 netzmacht David Molineus. All rights reserved.
|
||||
* @license LGPL-3.0 https://github.com/netzmacht/contao-leaflet-maps/blob/master/LICENSE
|
||||
* @filesource
|
||||
*/
|
||||
@@ -78,7 +79,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_style'] = [
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_style']['delete'],
|
||||
'href' => 'act=delete',
|
||||
'icon' => 'delete.gif',
|
||||
'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm']
|
||||
'attributes' => 'onclick="if(!confirm(\'' . ($GLOBALS['TL_LANG']['MSC']['deleteConfirm'] ?? '')
|
||||
. '\'))return false;Backend.getScrollOffset()"',
|
||||
],
|
||||
'toggle' => [
|
||||
@@ -145,7 +146,14 @@ $GLOBALS['TL_DCA']['tl_leaflet_style'] = [
|
||||
['netzmacht.contao_toolkit.dca.listeners.alias_generator', 'handleSaveCallback'],
|
||||
['netzmacht.contao_leaflet.listeners.dca.validator', 'validateAlias'],
|
||||
],
|
||||
'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true],
|
||||
'eval' => [
|
||||
'mandatory' => false,
|
||||
'maxlength' => 255,
|
||||
'tl_class' => 'w50',
|
||||
'unique' => true,
|
||||
'doNotCopy' => true,
|
||||
'nullIfEmpty' => true,
|
||||
],
|
||||
'toolkit' => [
|
||||
'alias_generator' => [
|
||||
'factory' => 'netzmacht.contao_leaflet.definition.alias_generator.factory_default',
|
||||
|
||||
@@ -5,7 +5,9 @@
|
||||
*
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2014-2017 netzmacht David Molineus. All rights reserved.
|
||||
* @author Sven Baumann <baumann.sv@gmail.com>
|
||||
* @author Stefan Heimes <stefan_heimes@hotmail.com>
|
||||
* @copyright 2014-2022 netzmacht David Molineus. All rights reserved.
|
||||
* @license LGPL-3.0 https://github.com/netzmacht/contao-leaflet-maps/blob/master/LICENSE
|
||||
* @filesource
|
||||
*/
|
||||
@@ -84,7 +86,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_vector'] = [
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['delete'],
|
||||
'href' => 'act=delete',
|
||||
'icon' => 'delete.gif',
|
||||
'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm']
|
||||
'attributes' => 'onclick="if(!confirm(\'' . ($GLOBALS['TL_LANG']['MSC']['deleteConfirm'] ?? '')
|
||||
. '\'))return false;Backend.getScrollOffset()"',
|
||||
],
|
||||
'toggle' => [
|
||||
@@ -185,7 +187,14 @@ $GLOBALS['TL_DCA']['tl_leaflet_vector'] = [
|
||||
['netzmacht.contao_toolkit.dca.listeners.alias_generator', 'handleSaveCallback'],
|
||||
['netzmacht.contao_leaflet.listeners.dca.validator', 'validateAlias'],
|
||||
],
|
||||
'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true],
|
||||
'eval' => [
|
||||
'mandatory' => false,
|
||||
'maxlength' => 255,
|
||||
'tl_class' => 'w50',
|
||||
'unique' => true,
|
||||
'doNotCopy' => true,
|
||||
'nullIfEmpty' => true,
|
||||
],
|
||||
'toolkit' => [
|
||||
'alias_generator' => [
|
||||
'factory' => 'netzmacht.contao_leaflet.definition.alias_generator.factory_default',
|
||||
@@ -372,6 +381,8 @@ $GLOBALS['TL_DCA']['tl_leaflet_vector'] = [
|
||||
'inputType' => 'textarea',
|
||||
'eval' => [
|
||||
'tl_class' => 'clr lng',
|
||||
'preserveTags' => true,
|
||||
'decodeEntities' => true,
|
||||
'allowHtml' => true,
|
||||
'style' => 'min-height: 40px;',
|
||||
'rte' => 'ace|json',
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
*
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @author Fritz Michael Gschwantner <fmg@inspiredminds.at>
|
||||
* @copyright 2014-2017 netzmacht David Molineus. All rights reserved.
|
||||
* @license LGPL-3.0 https://github.com/netzmacht/contao-leaflet-maps/blob/master/LICENSE
|
||||
* @filesource
|
||||
@@ -13,7 +14,7 @@
|
||||
$GLOBALS['TL_DCA']['tl_module']['metapalettes']['leaflet'] = [
|
||||
'type' => ['name', 'type', 'headline'],
|
||||
'leaflet' => ['leaflet_map', 'leaflet_mapId', 'leaflet_width', 'leaflet_height', 'leaflet_template'],
|
||||
'templates' => [':hide', 'customTpl'],
|
||||
'template' => [':hide', 'customTpl'],
|
||||
'protected' => [':hide', 'protected'],
|
||||
'expert' => [':hide', 'guests', 'cssID', 'space'],
|
||||
'invisible' => [':hide', 'invisible', 'start', 'start'],
|
||||
|
||||
@@ -58,7 +58,7 @@ $GLOBALS['TL_LANG']['tl_leaflet_layer']['groupTypes']['layer']['1'] = 'Ba
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['iconCreateFunction']['0'] = 'Cluster-Icon-Funktion erstellen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['iconCreateFunction']['1'] = 'Diese Funktion wird zum Erstellen des Cluster-Icons benutzt.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['icons']['0'] = 'Icons verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['icons']['1'] = 'Stile verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['icons']['1'] = 'Icon-Stile verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['map']['0'] = 'Karten verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['map']['1'] = 'Leaflet-Karten verwalten.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['markerCluster']['0'] = 'Marker-Cluster';
|
||||
@@ -83,7 +83,7 @@ $GLOBALS['TL_LANG']['tl_leaflet_layer']['pasteafter']['1'] = 'Na
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['pasteinto']['1'] = 'In Layer %s einfügen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['polygonOptions']['0'] = 'Polygon-Optionen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['popups']['0'] = 'Popups verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['popups']['1'] = 'Popup-Icons verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['popups']['1'] = 'Marker Popups verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['reference']['0'] = 'Referenz';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['reference']['1'] = 'Wählen Sie den Referenzlayer aus. Ansonsten wird dasselbe JavaScript-Objekt benutzt.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['removeOutsideVisibleBounds']['0'] = 'Entfernen, wenn außerhalb der sichtbaren Begrenzung';
|
||||
|
||||
@@ -35,8 +35,8 @@ $GLOBALS['TL_LANG']['tl_leaflet_popup']['delete']['0'] = 'Popup löschen
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['delete']['1'] = 'Popup ID %s löschen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['edit']['0'] = 'Popup bearbeiten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['edit']['1'] = 'Popup ID %s bearbeiten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['icons']['0'] = 'Popups verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['icons']['1'] = 'Marker-Popups verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['icons']['0'] = 'Icons verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['icons']['1'] = 'Marker-Icons verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['keepInView']['0'] = 'Im Sichtfeld behalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['keepInView']['1'] = 'Aktivieren Sie diese Einstellung um ein herausschieben des Popups aus dem sichbaren Bereich zu verhindern.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['layersBtn']['0'] = 'Layer verwalten';
|
||||
|
||||
@@ -44,7 +44,7 @@ $GLOBALS['TL_LANG']['tl_leaflet_style']['new']['1'] = 'Neuen Stil erstel
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_style']['opacity']['0'] = 'Linientransparenz';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_style']['opacity']['1'] = 'Die Transparenz des Striches kann einen Wert zwischen 0 und 1 annehmen.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_style']['popups']['0'] = 'Popups verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_style']['popups']['1'] = 'Popup-Icons verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_style']['popups']['1'] = 'Popup-Stile verwalten';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_style']['show']['0'] = 'Details anzeigen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_style']['show']['1'] = 'Details des Stils ID %s anzeigen';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_style']['stroke']['0'] = 'Linie ziehen';
|
||||
|
||||
@@ -21,7 +21,7 @@ $GLOBALS['TL_LANG']['tl_leaflet_layer']['map'][1] = 'Manage leaflet maps';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['icons'][0] = 'Manage icons';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['icons'][1] = 'Manage marker icons';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['popups'][0] = 'Manage popups';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['popups'][1] = 'Manage popups icons';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['popups'][1] = 'Manage popups styles';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['styles'][0] = 'Manage styles';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['styles'][1] = 'Manage vector styles';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['new'][0] = 'Create layer';
|
||||
|
||||
@@ -19,8 +19,8 @@ $GLOBALS['TL_LANG']['tl_leaflet_popup']['layersBtn'][0] = 'Manage layers';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['layersBtn'][1] = 'Manage leaflet layers';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['styles'][0] = 'Manage styles';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['styles'][1] = 'Manage vector styles';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['icons'][0] = 'Manage popups';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['icons'][1] = 'Manage marker popups';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['icons'][0] = 'Manage icons';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['icons'][1] = 'Manage marker icons';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['new'][0] = 'Create popup';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['new'][1] = 'Create new popup';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_popup']['edit'][0] = 'Edit popup';
|
||||
|
||||
@@ -19,7 +19,7 @@ $GLOBALS['TL_LANG']['tl_leaflet_style']['layersBtn'][1] = 'Manage leaflet layers
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_style']['icons'][0] = 'Manage icons';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_style']['icons'][1] = 'Manage marker icons';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_style']['popups'][0] = 'Manage popups';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_style']['popups'][1] = 'Manage popups icons';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_style']['popups'][1] = 'Manage popups styles';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_style']['new'][0] = 'Create style';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_style']['new'][1] = 'Create new style';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_style']['edit'][0] = 'Edit style';
|
||||
|
||||
@@ -9,5 +9,5 @@
|
||||
|
||||
</div>
|
||||
<!-- indexer::continue -->
|
||||
<?php $GLOBALS['TL_BODY'][] = '<script>' . $this->javascript . '</script>'; ?>
|
||||
<script><?= $this->javascript ?></script>
|
||||
|
||||
|
||||
@@ -9,4 +9,4 @@
|
||||
|
||||
</div>
|
||||
<!-- indexer::continue -->
|
||||
<?php $GLOBALS['TL_BODY'][] = '<script>' . $this->javascript . '</script>'; ?>
|
||||
<script><?= $this->javascript ?></script>
|
||||
|
||||
@@ -23,6 +23,10 @@
|
||||
padding-left: 20px !important;
|
||||
}
|
||||
|
||||
.tl_listing .tl_left {
|
||||
overflow: unset;
|
||||
}
|
||||
|
||||
.long .tl_text_2 {
|
||||
width: 325px;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
#tl_navigation .tl_level_1_group .group-leaflet {
|
||||
background: url(/bundles/netzmachtcontaoleaflet/img/leaflet.svg) 3px 2px no-repeat;
|
||||
#tl_navigation .group-leaflet {
|
||||
background: url(../img/leaflet.svg) 3px 2px no-repeat;
|
||||
}
|
||||
|
||||
.tl_help_table a {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -2,6 +2,8 @@
|
||||
|
||||
{% block headline %}{{ "MOD.leaflet_about.1"|trans({}, 'contao_modules') }}{% endblock %}
|
||||
|
||||
{% block error %}{% endblock %}
|
||||
|
||||
{% block main %}
|
||||
<div class="netzmacht-leaflet-credits">
|
||||
<div class="header">
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace Netzmacht\Contao\Leaflet\Event;
|
||||
use Contao\Model;
|
||||
use Netzmacht\Contao\Leaflet\Mapper\Request;
|
||||
use Netzmacht\LeafletPHP\Definition;
|
||||
use Symfony\Component\EventDispatcher\Event;
|
||||
use Symfony\Contracts\EventDispatcher\Event;
|
||||
|
||||
/**
|
||||
* Class BuildDefinitionEvent is emitted when the mapper maps between the model and the definition.
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace Netzmacht\Contao\Leaflet\Event;
|
||||
|
||||
use Netzmacht\LeafletPHP\Definition;
|
||||
use Netzmacht\LeafletPHP\Value\GeoJson\GeoJsonObject;
|
||||
use Symfony\Component\EventDispatcher\Event;
|
||||
use Symfony\Contracts\EventDispatcher\Event;
|
||||
|
||||
/**
|
||||
* Class ConvertToGeoJsonEvent is emitted when the DefinitionMapper converts a definition to a geo json feature.
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
namespace Netzmacht\Contao\Leaflet\Event;
|
||||
|
||||
use Symfony\Component\EventDispatcher\Event;
|
||||
use Symfony\Contracts\EventDispatcher\Event;
|
||||
|
||||
/**
|
||||
* Class GetHashEvent is emitted then a hash for a data object with an unknown type is required.
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
namespace Netzmacht\Contao\Leaflet\Event;
|
||||
|
||||
use Netzmacht\LeafletPHP\Definition\Map;
|
||||
use Symfony\Component\EventDispatcher\Event;
|
||||
use Symfony\Contracts\EventDispatcher\Event;
|
||||
|
||||
/**
|
||||
* Class GetJavascriptEvent is emitted after the map javascript was created.
|
||||
|
||||
@@ -24,7 +24,7 @@ use Netzmacht\Contao\Leaflet\Model\MapModel;
|
||||
use Netzmacht\Contao\Toolkit\Component\Hybrid\AbstractHybrid;
|
||||
use Netzmacht\Contao\Toolkit\Data\Model\RepositoryManager;
|
||||
use Symfony\Component\Templating\EngineInterface as TemplateEngine;
|
||||
use Symfony\Component\Translation\TranslatorInterface as Translator;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface as Translator;
|
||||
|
||||
/**
|
||||
* Class HybridTrait provides method required by the frontend module and content element the same time.
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
*
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2014-2017 netzmacht David Molineus. All rights reserved.
|
||||
* @author Sven Baumnn <baumann.sv@gmail.com>
|
||||
* @copyright 2014-2022 netzmacht David Molineus. All rights reserved.
|
||||
* @license LGPL-3.0 https://github.com/netzmacht/contao-leaflet-maps/blob/master/LICENSE
|
||||
* @filesource
|
||||
*/
|
||||
@@ -15,6 +16,7 @@ declare(strict_types=1);
|
||||
namespace Netzmacht\Contao\Leaflet\Frontend\Assets;
|
||||
|
||||
use Contao\CoreBundle\Framework\ContaoFrameworkInterface as ContaoFramework;
|
||||
use Traversable;
|
||||
|
||||
/**
|
||||
* Class LibrariesConfiguration.
|
||||
@@ -45,7 +47,7 @@ class LibrariesConfiguration implements \IteratorAggregate, \ArrayAccess
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.Superglobals)
|
||||
*/
|
||||
public function getIterator()
|
||||
public function getIterator(): Traversable
|
||||
{
|
||||
$this->framework->initialize();
|
||||
|
||||
@@ -57,7 +59,7 @@ class LibrariesConfiguration implements \IteratorAggregate, \ArrayAccess
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.Superglobals)
|
||||
*/
|
||||
public function offsetExists($offset)
|
||||
public function offsetExists($offset): bool
|
||||
{
|
||||
$this->framework->initialize();
|
||||
|
||||
@@ -81,7 +83,7 @@ class LibrariesConfiguration implements \IteratorAggregate, \ArrayAccess
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.Superglobals)
|
||||
*/
|
||||
public function offsetSet($offset, $value)
|
||||
public function offsetSet($offset, $value): void
|
||||
{
|
||||
$this->framework->initialize();
|
||||
|
||||
@@ -93,7 +95,7 @@ class LibrariesConfiguration implements \IteratorAggregate, \ArrayAccess
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.Superglobals)
|
||||
*/
|
||||
public function offsetUnset($offset)
|
||||
public function offsetUnset($offset): void
|
||||
{
|
||||
$this->framework->initialize();
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ use Netzmacht\Contao\Toolkit\Component\Component;
|
||||
use Netzmacht\Contao\Toolkit\Component\ComponentFactory;
|
||||
use Netzmacht\Contao\Toolkit\Data\Model\RepositoryManager;
|
||||
use Symfony\Component\Templating\EngineInterface as TemplateEngine;
|
||||
use Symfony\Component\Translation\TranslatorInterface as Translator;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface as Translator;
|
||||
|
||||
/**
|
||||
* Class MapElementFactory
|
||||
|
||||
@@ -93,7 +93,7 @@ class DataController
|
||||
$filter = null;
|
||||
}
|
||||
|
||||
list($data, $error) = $this->loadData($mapProvider, $input['type'], $input['id'], $filter);
|
||||
[$data, $error] = $this->loadData($mapProvider, $input['type'], $input['id'], $filter);
|
||||
$this->encodeData($input['format'], $data);
|
||||
} catch (\Exception $e) {
|
||||
if ($this->debugMode) {
|
||||
|
||||
@@ -14,7 +14,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace Netzmacht\Contao\Leaflet\Frontend\Module;
|
||||
|
||||
use Contao\Config;
|
||||
use Contao\CoreBundle\Framework\Adapter;
|
||||
use Contao\Input;
|
||||
use Netzmacht\Contao\Leaflet\MapProvider;
|
||||
@@ -22,7 +21,7 @@ use Netzmacht\Contao\Toolkit\Component\Component;
|
||||
use Netzmacht\Contao\Toolkit\Component\ComponentFactory;
|
||||
use Netzmacht\Contao\Toolkit\Data\Model\RepositoryManager;
|
||||
use Symfony\Component\Templating\EngineInterface as TemplateEngine;
|
||||
use Symfony\Component\Translation\TranslatorInterface as Translator;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface as Translator;
|
||||
|
||||
/**
|
||||
* Class MapElementFactory
|
||||
|
||||
@@ -18,7 +18,7 @@ use Contao\CoreBundle\Event\MenuEvent;
|
||||
use Netzmacht\Contao\Toolkit\View\Assets\AssetsManager;
|
||||
use Symfony\Component\HttpFoundation\RequestStack;
|
||||
use Symfony\Component\Routing\RouterInterface as Router;
|
||||
use Symfony\Component\Translation\TranslatorInterface as Translator;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface as Translator;
|
||||
|
||||
/**
|
||||
* Class BackendMenuListener adds backend entries to the navigation.
|
||||
|
||||
@@ -147,9 +147,9 @@ class ControlDcaListener extends AbstractListener
|
||||
$statement = $this->connection->prepare($query);
|
||||
|
||||
$statement->bindValue('cid', $dataContainer->id);
|
||||
$statement->execute();
|
||||
$result = $statement->executeQuery();
|
||||
|
||||
return $statement->fetchAll();
|
||||
return $result->fetchAllAssociative();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -167,9 +167,9 @@ class ControlDcaListener extends AbstractListener
|
||||
$query = 'SELECT * FROM tl_leaflet_control_layer WHERE cid=:cid order BY sorting';
|
||||
$statement = $this->connection->prepare($query);
|
||||
$statement->bindValue('cid', $dataContainer->id);
|
||||
$statement->execute();
|
||||
$result = $statement->executeQuery();
|
||||
|
||||
while ($row = $statement->fetch()) {
|
||||
while ($row = $result->fetchAssociative()) {
|
||||
$values[$row['lid']] = $row;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ use Contao\StringUtil;
|
||||
use Netzmacht\Contao\Leaflet\Model\MapModel;
|
||||
use Netzmacht\Contao\Toolkit\Data\Model\RepositoryManager;
|
||||
use Netzmacht\Contao\Toolkit\Dca\Options\OptionsBuilder;
|
||||
use Symfony\Component\Translation\TranslatorInterface as Translator;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface as Translator;
|
||||
|
||||
/**
|
||||
* Class Module is the helper for the tl_module dca.
|
||||
@@ -103,7 +103,7 @@ final class FrontendIntegrationListener
|
||||
)
|
||||
),
|
||||
Image::getHtml(
|
||||
'alias.gif',
|
||||
'alias.svg',
|
||||
$this->translator->trans('editalias.0', [$dataContainer->value], 'contao_tl_content'),
|
||||
'style="vertical-align:top"'
|
||||
)
|
||||
|
||||
@@ -25,7 +25,7 @@ use Netzmacht\Contao\Toolkit\Data\Model\RepositoryManager;
|
||||
use Netzmacht\Contao\Toolkit\Dca\Listener\AbstractListener;
|
||||
use Netzmacht\Contao\Toolkit\Dca\Manager;
|
||||
use Netzmacht\Contao\Toolkit\Dca\Options\OptionsBuilder;
|
||||
use Symfony\Component\Translation\TranslatorInterface as Translator;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface as Translator;
|
||||
|
||||
/**
|
||||
* Class Layer is the helper class for the tl_leaflet_layer dca.
|
||||
@@ -197,7 +197,7 @@ class LayerDcaListener extends AbstractListener
|
||||
if (!empty($this->layers[$row['type']]['icon'])) {
|
||||
$src = $this->layers[$row['type']]['icon'];
|
||||
} else {
|
||||
$src = 'iconPLAIN.gif';
|
||||
$src = 'iconPLAIN.svg';
|
||||
}
|
||||
|
||||
$activeIcon = $src;
|
||||
@@ -275,12 +275,12 @@ class LayerDcaListener extends AbstractListener
|
||||
$pasteAfterUrl,
|
||||
StringUtil::specialchars($this->translator->trans('pasteafter.1', [$row['id']], 'contao_' . $table)),
|
||||
Image::getHtml(
|
||||
'pasteafter.gif',
|
||||
'pasteafter.svg',
|
||||
$this->translator->trans('pasteafter.1', [$row['id']], 'contao_' . $table)
|
||||
)
|
||||
);
|
||||
|
||||
if (!empty($this->layers[$row['type']]['children'])) {
|
||||
if (isset($row['type']) && !empty($this->layers[$row['type']]['children'])) {
|
||||
$pasteIntoUrl = $this->backendAdapter->addToUrl(
|
||||
sprintf(
|
||||
'act=%s&mode=2&pid=%s%s',
|
||||
@@ -295,12 +295,12 @@ class LayerDcaListener extends AbstractListener
|
||||
$pasteIntoUrl,
|
||||
StringUtil::specialchars($this->translator->trans('pasteinto.1', [$row['id']], 'contao_' . $table)),
|
||||
Image::getHtml(
|
||||
'pasteinto.gif',
|
||||
'pasteinto.svg',
|
||||
$this->translator->trans('pasteinto.1', [$row['id']], 'contao_' . $table)
|
||||
)
|
||||
);
|
||||
} elseif ($row['id'] > 0) {
|
||||
$buffer .= Image::getHtml('pasteinto_.gif');
|
||||
$buffer .= Image::getHtml('pasteinto_.svg');
|
||||
}
|
||||
|
||||
return $buffer;
|
||||
@@ -361,25 +361,25 @@ class LayerDcaListener extends AbstractListener
|
||||
if ($undoId) {
|
||||
$statement = $this->connection->prepare('SELECT * FROM tl_undo WHERE id=:id LIMIT 0,1');
|
||||
$statement->bindValue('id', $undoId);
|
||||
$statement->execute();
|
||||
$result = $statement->executeQuery();
|
||||
|
||||
$undo = $statement->fetch();
|
||||
$undo = $result->fetchAssociative();
|
||||
|
||||
$statement = $this->connection->prepare('SELECT * FROM tl_leaflet_map_layer WHERE lid=:lid');
|
||||
$statement->bindValue('lid', $dataContainer->id);
|
||||
$statement->execute();
|
||||
$result = $statement->executeQuery();
|
||||
|
||||
$undo['data'] = StringUtil::deserialize($undo['data'], true);
|
||||
|
||||
while ($row = $statement->fetch()) {
|
||||
while ($row = $result->fetchAssociative()) {
|
||||
$undo['data']['tl_leaflet_map_layer'][] = $row;
|
||||
}
|
||||
|
||||
$statement = $this->connection->prepare('SELECT * FROM tl_leaflet_control_layer WHERE lid=:lid');
|
||||
$statement->bindValue('lid', $dataContainer->id);
|
||||
$statement->execute();
|
||||
$result = $statement->executeQuery();
|
||||
|
||||
$undo['data']['tl_leaflet_control_layer'] = $statement->fetchAll();
|
||||
$undo['data']['tl_leaflet_control_layer'] = $result->fetchAllAssociative();
|
||||
|
||||
$this->connection->update('tl_undo', ['data' => $undo['data']], ['id' => $undo['id']]);
|
||||
}
|
||||
|
||||
@@ -17,9 +17,9 @@ use Contao\DataContainer;
|
||||
use Contao\System;
|
||||
use Netzmacht\Contao\Leaflet\Model\LayerModel;
|
||||
use Netzmacht\Contao\Toolkit\Data\Model\RepositoryManager;
|
||||
use Netzmacht\Contao\Toolkit\View\Template\TemplateRenderer;
|
||||
use Netzmacht\LeafletPHP\Value\LatLng;
|
||||
use Symfony\Component\Filesystem\Filesystem;
|
||||
use Symfony\Component\Templating\EngineInterface as TemplateEngine;
|
||||
|
||||
/**
|
||||
* Class Leaflet is the base helper providing different methods.
|
||||
@@ -50,11 +50,11 @@ class LeafletDcaListener
|
||||
private $repositoryManager;
|
||||
|
||||
/**
|
||||
* Template engine.
|
||||
* Template renderer.
|
||||
*
|
||||
* @var TemplateEngine
|
||||
* @var TemplateRenderer
|
||||
*/
|
||||
private $templateEngine;
|
||||
private $templateRenderer;
|
||||
|
||||
/**
|
||||
* System adapter.
|
||||
@@ -67,20 +67,20 @@ class LeafletDcaListener
|
||||
* LeafletCallbacks constructor.
|
||||
*
|
||||
* @param RepositoryManager $repositoryManager Repository manager.
|
||||
* @param TemplateEngine $templateEngine Template engine.
|
||||
* @param TemplateRenderer $templateRenderer Template renderer.
|
||||
* @param Filesystem $fileSystem File system.
|
||||
* @param Adapter|System $systemAdapter Contao system adapter.
|
||||
* @param string $cacheDir Cache dir.
|
||||
*/
|
||||
public function __construct(
|
||||
RepositoryManager $repositoryManager,
|
||||
TemplateEngine $templateEngine,
|
||||
TemplateRenderer $templateRenderer,
|
||||
Filesystem $fileSystem,
|
||||
$systemAdapter,
|
||||
string $cacheDir
|
||||
) {
|
||||
$this->repositoryManager = $repositoryManager;
|
||||
$this->templateEngine = $templateEngine;
|
||||
$this->templateRenderer = $templateRenderer;
|
||||
$this->fileSystem = $fileSystem;
|
||||
$this->systemAdapter = $systemAdapter;
|
||||
$this->cacheDir = $cacheDir;
|
||||
@@ -125,7 +125,7 @@ class LeafletDcaListener
|
||||
$data['marker'] = null;
|
||||
}
|
||||
|
||||
return $this->templateEngine->render('toolkit:be:be_leaflet_geocode.html5', $data);
|
||||
return $this->templateRenderer->render('be:be_leaflet_geocode', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -24,11 +24,8 @@ use Netzmacht\Contao\Toolkit\Data\Model\RepositoryManager;
|
||||
use Netzmacht\Contao\Toolkit\Dca\Listener\AbstractListener;
|
||||
use Netzmacht\Contao\Toolkit\Dca\Manager;
|
||||
use Netzmacht\Contao\Toolkit\Dca\Options\OptionsBuilder;
|
||||
use PDO;
|
||||
use function strlen;
|
||||
use Symfony\Component\HttpFoundation\Session\Session;
|
||||
use Symfony\Component\Translation\TranslatorInterface as Translator;
|
||||
use function var_dump;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface as Translator;
|
||||
|
||||
/**
|
||||
* Class Map is the helper class for the tl_leaflet_map dca.
|
||||
@@ -138,12 +135,9 @@ class MapDcaListener extends AbstractListener
|
||||
{
|
||||
$statement = $this->connection->prepare('SELECT lid FROM tl_leaflet_map_layer WHERE mid=:mid ORDER BY sorting');
|
||||
$statement->bindValue('mid', $dataContainer->id);
|
||||
$result = $statement->executeQuery();
|
||||
|
||||
if ($statement->execute()) {
|
||||
return $statement->fetchAll(PDO::FETCH_COLUMN, 0);
|
||||
}
|
||||
|
||||
return [];
|
||||
return $result->fetchFirstColumn();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -161,9 +155,9 @@ class MapDcaListener extends AbstractListener
|
||||
$statement = $this->connection->prepare('SELECT * FROM tl_leaflet_map_layer WHERE mid=:mid order BY sorting');
|
||||
|
||||
$statement->bindValue('mid', $dataContainer->id);
|
||||
$statement->execute();
|
||||
$result = $statement->executeQuery();
|
||||
|
||||
while ($row = $statement->fetch()) {
|
||||
while ($row = $result->fetchAssociative()) {
|
||||
$values[$row['lid']] = $row;
|
||||
}
|
||||
|
||||
@@ -228,4 +222,26 @@ class MapDcaListener extends AbstractListener
|
||||
->asTree()
|
||||
->getOptions();
|
||||
}
|
||||
|
||||
/**
|
||||
* Copy layer relations if a map is duplicated.
|
||||
*
|
||||
* @param string|int $insertId Insert id of the new map.
|
||||
* @param DataContainer $dataContainer Data container driver.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function copyLayerRelations($insertId, DataContainer $dataContainer): void
|
||||
{
|
||||
$statement = $this->connection->prepare('SELECT * FROM tl_leaflet_map_layer WHERE mid=:mid order BY sorting');
|
||||
$statement->bindValue('mid', $dataContainer->id);
|
||||
$result = $statement->executeQuery();
|
||||
|
||||
while ($row = $result->fetchAssociative()) {
|
||||
unset($row['id']);
|
||||
$row['tstamp'] = time();
|
||||
$row['mid'] = $insertId;
|
||||
$this->connection->insert('tl_leaflet_map_layer', $row);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -145,9 +145,9 @@ class MarkerDcaListener
|
||||
$statement = $this->connection->prepare($query);
|
||||
$statement->bindValue('id', $dataContainer->id);
|
||||
|
||||
$statement->execute();
|
||||
$result = $statement->executeQuery();
|
||||
|
||||
if ($row = $statement->fetch()) {
|
||||
if ($row = $result->fetchAssociative()) {
|
||||
$buffer = $row['latitude'];
|
||||
|
||||
if ($buffer && $row['longitude']) {
|
||||
|
||||
@@ -16,7 +16,7 @@ use Contao\DataContainer;
|
||||
use Contao\StringUtil;
|
||||
use Netzmacht\Contao\Toolkit\Dca\Manager;
|
||||
use Netzmacht\LeafletPHP\Value\LatLng;
|
||||
use Symfony\Component\Translation\TranslatorInterface as Translator;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface as Translator;
|
||||
|
||||
/**
|
||||
* Class Validator.
|
||||
|
||||
@@ -178,7 +178,7 @@ final class GeoJsonListener
|
||||
private function parseModelValue(Model $model, &$property)
|
||||
{
|
||||
if (is_array($property)) {
|
||||
list($property, $type) = $property;
|
||||
[$property, $type] = $property;
|
||||
$value = $model->$property;
|
||||
|
||||
switch ($type) {
|
||||
|
||||
@@ -143,12 +143,12 @@ class LoadAssetsListener
|
||||
$assets = $this->libraries[$library];
|
||||
|
||||
if (!empty($assets['css'])) {
|
||||
list ($source, $type) = (array) $assets['css'];
|
||||
[$source, $type] = array_pad((array) $assets['css'], 2, null);
|
||||
$this->assets->addStylesheet($source, $type ?: Assets::TYPE_FILE);
|
||||
}
|
||||
|
||||
if (!empty($assets['javascript'])) {
|
||||
list ($source, $type) = (array) $assets['javascript'];
|
||||
[$source, $type] = array_pad((array) $assets['javascript'], 2, null);
|
||||
$this->assets->addJavascript($source, $type ?: Assets::TYPE_FILE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,11 +60,11 @@ final class RegisterLibrariesListener
|
||||
{
|
||||
foreach ($this->libraries as $name => $assets) {
|
||||
if (!empty($assets['css'])) {
|
||||
list ($source, $type) = (array) $assets['css'];
|
||||
[$source, $type] = array_pad((array) $assets['css'], 2, null);
|
||||
$this->leaflet->registerStylesheet($name, $source, $type ?: Assets::TYPE_FILE);
|
||||
}
|
||||
if (!empty($assets['javascript'])) {
|
||||
list ($source, $type) = (array) $assets['javascript'];
|
||||
[$source, $type] = array_pad((array) $assets['javascript'], 2, null);
|
||||
$this->leaflet->registerJavascript($name, $source, $type ?: Assets::TYPE_FILE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
*
|
||||
* @package contao-leaflet-maps
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @author Stefan Heimes <stefan_heimes@hotmail.com>
|
||||
* @copyright 2014-2017 netzmacht David Molineus. All rights reserved.
|
||||
* @license LGPL-3.0 https://github.com/netzmacht/contao-leaflet-maps/blob/master/LICENSE
|
||||
* @filesource
|
||||
@@ -13,7 +14,6 @@
|
||||
namespace Netzmacht\Contao\Leaflet;
|
||||
|
||||
use Contao\Input;
|
||||
use Doctrine\Common\Cache\Cache;
|
||||
use Netzmacht\Contao\Leaflet\Encoder\ContaoAssets;
|
||||
use Netzmacht\Contao\Leaflet\Event\GetJavascriptEvent;
|
||||
use Netzmacht\Contao\Leaflet\Filter\Filter;
|
||||
@@ -24,11 +24,14 @@ use Netzmacht\Contao\Leaflet\Model\LayerModel;
|
||||
use Netzmacht\Contao\Leaflet\Model\MapModel;
|
||||
use Netzmacht\Contao\Toolkit\Data\Model\RepositoryManager;
|
||||
use Netzmacht\Contao\Toolkit\View\Template\TemplateReference;
|
||||
use Netzmacht\Contao\Toolkit\View\Template\TemplateRenderer;
|
||||
use Netzmacht\LeafletPHP\Definition\Map;
|
||||
use Netzmacht\LeafletPHP\Leaflet;
|
||||
use Netzmacht\LeafletPHP\Value\GeoJson\FeatureCollection;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface as EventDispatcher;
|
||||
use Symfony\Component\Templating\EngineInterface as TemplateEngine;
|
||||
use Symfony\Component\Cache\CacheItem;
|
||||
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface as EventDispatcher;
|
||||
use Symfony\Contracts\Cache\CacheInterface as Cache;
|
||||
use function dd;
|
||||
|
||||
/**
|
||||
* Class MapProvider.
|
||||
@@ -94,11 +97,11 @@ class MapProvider
|
||||
private $repositoryManager;
|
||||
|
||||
/**
|
||||
* Template engine.
|
||||
* Template renderer.
|
||||
*
|
||||
* @var TemplateEngine
|
||||
* @var TemplateRenderer
|
||||
*/
|
||||
private $templateEngine;
|
||||
private $templateRenderer;
|
||||
|
||||
/**
|
||||
* Construct.
|
||||
@@ -111,7 +114,7 @@ class MapProvider
|
||||
* @param Cache $cache Cache.
|
||||
* @param DataController $dataController Data controller.
|
||||
* @param RepositoryManager $repositoryManager Repository manager.
|
||||
* @param TemplateEngine $templateEngine Template engine.
|
||||
* @param TemplateRenderer $templateRenderer Template rednerer.
|
||||
*/
|
||||
public function __construct(
|
||||
DefinitionMapper $mapper,
|
||||
@@ -122,7 +125,7 @@ class MapProvider
|
||||
Cache $cache,
|
||||
DataController $dataController,
|
||||
RepositoryManager $repositoryManager,
|
||||
TemplateEngine $templateEngine
|
||||
TemplateRenderer $templateRenderer
|
||||
) {
|
||||
$this->mapper = $mapper;
|
||||
$this->leaflet = $leaflet;
|
||||
@@ -132,7 +135,7 @@ class MapProvider
|
||||
$this->cache = $cache;
|
||||
$this->dataController = $dataController;
|
||||
$this->repositoryManager = $repositoryManager;
|
||||
$this->templateEngine = $templateEngine;
|
||||
$this->templateRenderer = $templateRenderer;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -212,25 +215,29 @@ class MapProvider
|
||||
if ($doCache) {
|
||||
$cacheKey = $this->getCacheKey($mapId, $filter, $elementId, $template, $style);
|
||||
|
||||
if ($this->cache->contains($cacheKey)) {
|
||||
$cached = $this->cache->fetch($cacheKey);
|
||||
$this->assets->fromArray($cached['assets']);
|
||||
if ($this->cache->hasItem($cacheKey)) {
|
||||
$cached = $this->cache->getItem($cacheKey);
|
||||
$cachedData = $cached->get();
|
||||
$this->assets->fromArray($cachedData['assets']);
|
||||
|
||||
return $cached['javascript'];
|
||||
return $cachedData['javascript'];
|
||||
} else {
|
||||
$cached = $this->cache->getItem($cacheKey);
|
||||
}
|
||||
}
|
||||
|
||||
$buffer = $this->doGenerate($model, $filter, $elementId, $template, $style);
|
||||
|
||||
if ($doCache) {
|
||||
$this->cache->save(
|
||||
$cacheKey,
|
||||
$cached
|
||||
->expiresAfter((int) $model->cacheLifeTime)
|
||||
->set(
|
||||
[
|
||||
'assets' => $this->assets->toArray(),
|
||||
'javascript' => $buffer,
|
||||
],
|
||||
(int) $model->cacheLifeTime
|
||||
]
|
||||
);
|
||||
$this->cache->save($cached);
|
||||
}
|
||||
|
||||
return $buffer;
|
||||
@@ -270,12 +277,19 @@ class MapProvider
|
||||
$cacheKey .= '.filter_' . md5($filter->toRequest());
|
||||
}
|
||||
|
||||
if ($this->cache->contains($cacheKey)) {
|
||||
return $this->cache->fetch($cacheKey);
|
||||
if ($this->cache->hasItem($cacheKey)) {
|
||||
$cachedItem = $this->cache->getItem($cacheKey);
|
||||
|
||||
return $cachedItem->get();
|
||||
} else {
|
||||
$cachedItem = $this->cache->getItem($cacheKey);
|
||||
}
|
||||
|
||||
$collection = $this->mapper->handleGeoJson($model, $request);
|
||||
$this->cache->save($cacheKey, $collection, $model->cacheLifeTime);
|
||||
$cachedItem
|
||||
->expiresAfter($model->cacheLifeTime)
|
||||
->set($collection);
|
||||
$this->cache->save($cachedItem);
|
||||
|
||||
return $collection;
|
||||
}
|
||||
@@ -374,7 +388,7 @@ class MapProvider
|
||||
$javascript = $this->leaflet->build($definition, $this->assets);
|
||||
$mapId = $definition->getId();
|
||||
|
||||
$templateReference = new TemplateReference($template, 'html5', TemplateReference::SCOPE_FRONTEND);
|
||||
$templateReference = 'fe:' . $template;
|
||||
$parameters = [
|
||||
'definition' => $definition,
|
||||
'model' => $model,
|
||||
@@ -384,12 +398,16 @@ class MapProvider
|
||||
'mapId' => $mapId,
|
||||
];
|
||||
|
||||
$content = $this->templateEngine->render($templateReference, $parameters);
|
||||
$content = $this->templateRenderer->render($templateReference, $parameters);
|
||||
$content = preg_replace(
|
||||
['/^(\s*)<!-- TEMPLATE \(?START\)?: .+ -->\n*/', '/\n*<!-- TEMPLATE \(?END\)?: .+ -->$/'],
|
||||
['$1', ''],
|
||||
$content
|
||||
);
|
||||
|
||||
$event = new GetJavascriptEvent($definition, $content);
|
||||
$this->eventDispatcher->dispatch($event::NAME, $event);
|
||||
$this->eventDispatcher->dispatch($event, $event::NAME);
|
||||
|
||||
$buffer = $event->getJavascript();
|
||||
|
||||
return $buffer;
|
||||
return $event->getJavascript();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ use Netzmacht\LeafletPHP\Value\GeoJson\ConvertsToGeoJsonFeature;
|
||||
use Netzmacht\LeafletPHP\Value\GeoJson\Feature;
|
||||
use Netzmacht\LeafletPHP\Value\GeoJson\FeatureCollection;
|
||||
use Netzmacht\LeafletPHP\Value\GeoJson\GeoJsonFeature;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface as EventDispatcher;
|
||||
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface as EventDispatcher;
|
||||
|
||||
/**
|
||||
* Class DefinitionMapper is the main mapper instance which contains all other mappers as children.
|
||||
@@ -111,7 +111,7 @@ class DefinitionMapper
|
||||
|
||||
if ($definition) {
|
||||
$event = new BuildDefinitionEvent($definition, $model, $request);
|
||||
$this->eventDispatcher->dispatch($event::NAME, $event);
|
||||
$this->eventDispatcher->dispatch($event, $event::NAME);
|
||||
}
|
||||
|
||||
$this->mapped[$hash] = $definition;
|
||||
@@ -172,7 +172,7 @@ class DefinitionMapper
|
||||
}
|
||||
|
||||
$event = new ConvertToGeoJsonEvent($definition, $feature, $model);
|
||||
$this->eventDispatcher->dispatch($event::NAME, $event);
|
||||
$this->eventDispatcher->dispatch($event, $event::NAME);
|
||||
|
||||
return $feature;
|
||||
}
|
||||
@@ -190,7 +190,7 @@ class DefinitionMapper
|
||||
private function hash($model, $elementId = null)
|
||||
{
|
||||
$event = new GetHashEvent($model);
|
||||
$this->eventDispatcher->dispatch($event::NAME, $event);
|
||||
$this->eventDispatcher->dispatch($event, $event::NAME);
|
||||
$hash = $event->getHash();
|
||||
|
||||
if (!$hash) {
|
||||
|
||||
@@ -14,6 +14,8 @@ declare(strict_types=1);
|
||||
|
||||
namespace Netzmacht\Contao\Leaflet\Mapper\Layer;
|
||||
|
||||
use Contao\CoreBundle\Framework\Adapter;
|
||||
use Contao\Environment;
|
||||
use Contao\FilesModel;
|
||||
use Contao\Model;
|
||||
use Netzmacht\Contao\Leaflet\Mapper\DefinitionMapper;
|
||||
@@ -58,16 +60,25 @@ class FileLayerMapper extends AbstractLayerMapper
|
||||
*/
|
||||
private $repositoryManager;
|
||||
|
||||
/**
|
||||
* Environment.
|
||||
*
|
||||
* @var Adapter<Environment>
|
||||
*/
|
||||
private $environmentAdapter;
|
||||
|
||||
/**
|
||||
* Construct.
|
||||
*
|
||||
* @param RepositoryManager $repositoryManager Repository manager.
|
||||
* @param Adapter<Environment> $environmentAdapter Environment adapter.
|
||||
*/
|
||||
public function __construct(RepositoryManager $repositoryManager)
|
||||
public function __construct(RepositoryManager $repositoryManager, Adapter $environmentAdapter)
|
||||
{
|
||||
$this->repositoryManager = $repositoryManager;
|
||||
|
||||
parent::__construct();
|
||||
|
||||
$this->repositoryManager = $repositoryManager;
|
||||
$this->environmentAdapter = $environmentAdapter;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -103,25 +114,26 @@ class FileLayerMapper extends AbstractLayerMapper
|
||||
$layerId = $this->getElementId($model, $elementId);
|
||||
|
||||
if ($fileModel instanceof FilesModel && $fileModel->type === 'file') {
|
||||
$url = $this->environmentAdapter->get('url') . '/' . $fileModel->path;
|
||||
switch ($model->fileFormat) {
|
||||
case 'gpx':
|
||||
$layer = new Gpx($layerId, $fileModel->path);
|
||||
$layer = new Gpx($layerId, $url);
|
||||
break;
|
||||
|
||||
case 'kml':
|
||||
$layer = new Kml($layerId, $fileModel->path);
|
||||
$layer = new Kml($layerId, $url);
|
||||
break;
|
||||
|
||||
case 'wkt':
|
||||
$layer = new Wkt($layerId, $fileModel->path);
|
||||
$layer = new Wkt($layerId, $url);
|
||||
break;
|
||||
|
||||
case 'geojson':
|
||||
$layer = new OmnivoreGeoJson($layerId, $fileModel->path);
|
||||
$layer = new OmnivoreGeoJson($layerId, $url);
|
||||
break;
|
||||
|
||||
case 'topojson':
|
||||
$layer = new TopoJson($layerId, $fileModel->path);
|
||||
$layer = new TopoJson($layerId, $url);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
@@ -93,7 +93,7 @@ class TileLayerMapper extends AbstractLayerMapper
|
||||
/** @var TileLayer $definition */
|
||||
$bounds = StringUtil::deserialize($model->bounds);
|
||||
|
||||
if ($request[0] && $request[1]) {
|
||||
if ($bounds[0] && $bounds[1]) {
|
||||
$bounds = array_map(
|
||||
function ($value) {
|
||||
return explode(',', $value, 3);
|
||||
|
||||
@@ -210,6 +210,10 @@ class OptionsBuilder
|
||||
foreach ($options as $option => $mapping) {
|
||||
$default = static::getDefaultOption($option, $definition);
|
||||
|
||||
if ($model->$mapping === null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($model->$mapping === '1' || $model->$mapping === '') {
|
||||
if (((bool) $model->$mapping) !== $default) {
|
||||
static::applyOption($option, $model->$mapping, $definition);
|
||||
|
||||
@@ -72,15 +72,9 @@ class ImageIconMapper extends AbstractIconMapper
|
||||
$elementId = null
|
||||
) {
|
||||
$arguments = parent::buildConstructArguments($model, $mapper, $request, $elementId);
|
||||
|
||||
if ($model->iconImage) {
|
||||
$repository = $this->repositoryManager->getRepository(FilesModel::class);
|
||||
$file = $repository->findByUuid($model->iconImage);
|
||||
|
||||
if ($file) {
|
||||
$arguments[] = $file->path;
|
||||
}
|
||||
}
|
||||
$arguments[] = $file ? $file->path : '';
|
||||
|
||||
return $arguments;
|
||||
}
|
||||
@@ -117,8 +111,6 @@ class ImageIconMapper extends AbstractIconMapper
|
||||
$file = $repository->findByUuid($model->iconImage);
|
||||
|
||||
if ($file) {
|
||||
$definition->setIconUrl($file->path);
|
||||
|
||||
$file = new File($file->path);
|
||||
$definition->setIconSize([$file->width, $file->height]);
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ SELECT l.*, c.mode as controlMode
|
||||
FROM tl_leaflet_layer l
|
||||
LEFT JOIN tl_leaflet_control_layer c ON l.id = c.lid
|
||||
WHERE c.cid=?
|
||||
ORDER BY c.sorting
|
||||
SQL;
|
||||
|
||||
$result = Database::getInstance()
|
||||
@@ -67,6 +68,7 @@ FROM tl_leaflet_layer l
|
||||
LEFT JOIN tl_leaflet_control_layer
|
||||
c ON l.id = c.lid
|
||||
WHERE c.cid=? AND l.active=1
|
||||
ORDER BY c.sorting
|
||||
SQL;
|
||||
|
||||
$result = Database::getInstance()
|
||||
|
||||
@@ -17,7 +17,6 @@ use Netzmacht\Contao\Leaflet\Filter\BboxFilter;
|
||||
use Netzmacht\Contao\Leaflet\Filter\DistanceFilter;
|
||||
use Netzmacht\Contao\Leaflet\Filter\Filter;
|
||||
use Netzmacht\LeafletPHP\Value\LatLngBounds;
|
||||
use function var_dump;
|
||||
|
||||
/**
|
||||
* Class MarkerModel for the tl_leaflet_marker table.
|
||||
@@ -50,8 +49,8 @@ class MarkerModel extends AbstractActiveModel
|
||||
[
|
||||
$table . '.active=1',
|
||||
$table . '.pid=?',
|
||||
$table . '.latitude>0',
|
||||
$table . '.longitude>0',
|
||||
$table . '.latitude IS NOT NULL',
|
||||
$table . '.longitude IS NOT NULL',
|
||||
],
|
||||
[$pid],
|
||||
['order' => 'sorting']
|
||||
|
||||
Reference in New Issue
Block a user