Compare commits
38
Commits
20e56aab1f
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
38d575cbe9 | ||
|
|
f9e8704046 | ||
|
|
49547ecda3 | ||
|
|
eb096bd8b5 | ||
|
|
b3541b21fb | ||
|
|
93ed5c6962 | ||
|
|
942724fdd1 | ||
|
|
e52f7dcff8 | ||
|
|
30e531497d | ||
|
|
2cb37e760a | ||
|
|
3ff3251419 | ||
|
|
abcd39107b | ||
|
|
599e3c7ee2 | ||
|
|
6ff308015a | ||
|
|
6e0479bf22 | ||
|
|
fb8fddf669 | ||
|
|
f745c7b683 | ||
|
|
9b3550ec40 | ||
|
|
d9943619f6 | ||
|
|
e33b57c9f1 | ||
|
|
dc594efee1 | ||
|
|
432d8da350 | ||
|
|
5b338eeab6 | ||
|
|
05ceae5100 | ||
|
|
f005272242 | ||
|
|
7d856d1031 | ||
|
|
f9e94231a7 | ||
|
|
0a3e8f59cb | ||
|
|
a01d1ba0c5 | ||
|
|
6828e49663 | ||
|
|
46001a02ed | ||
|
|
5e39e39b90 | ||
|
|
8dad782603 | ||
|
|
0e6a65dfa0 | ||
|
|
8f421da599 | ||
|
|
39fb85744d | ||
|
|
07b42c9334 | ||
|
|
e27b376285 |
@@ -0,0 +1,38 @@
|
||||
name: redis
|
||||
repository: ddev/ddev-redis
|
||||
version: v2.2.0
|
||||
install_date: "2026-09-08T18:12:40+02:00"
|
||||
project_files:
|
||||
- docker-compose.redis.yaml
|
||||
- redis/scripts/settings.ddev.redis.php
|
||||
- redis/scripts/setup-drupal-settings.sh
|
||||
- redis/scripts/setup-redis-optimized-config.sh
|
||||
- redis/redis.conf
|
||||
- redis/advanced.conf
|
||||
- redis/append.conf
|
||||
- redis/general.conf
|
||||
- redis/io.conf
|
||||
- redis/memory.conf
|
||||
- redis/network.conf
|
||||
- redis/security.conf
|
||||
- redis/snapshots.conf
|
||||
- commands/host/redis-backend
|
||||
- commands/redis/redis-cli
|
||||
- commands/redis/redis-flush
|
||||
global_files: []
|
||||
removal_actions:
|
||||
- |
|
||||
#ddev-description:Remove redis settings if applicable
|
||||
files=(
|
||||
"${DDEV_APPROOT}/${DDEV_DOCROOT}/sites/default/settings.ddev.redis.php"
|
||||
"${DDEV_APPROOT}/.ddev/docker-compose.redis_extra.yaml"
|
||||
)
|
||||
for file in "${files[@]}"; do
|
||||
if [ -f "$file" ]; then
|
||||
if grep -q '#ddev-generated' "$file"; then
|
||||
rm -f "$file"
|
||||
else
|
||||
echo "Unwilling to remove '$file' because it does not have #ddev-generated in it; you can manually delete it if it is safe to delete."
|
||||
fi
|
||||
fi
|
||||
done
|
||||
Executable
+124
@@ -0,0 +1,124 @@
|
||||
#!/usr/bin/env bash
|
||||
#ddev-generated
|
||||
|
||||
## Description: Use a different key-value store for Redis
|
||||
## Usage: redis-backend <image> [optimize]
|
||||
## Example: ddev redis-backend redis-alpine optimize
|
||||
|
||||
REDIS_DOCKER_IMAGE=${1:-}
|
||||
REDIS_CONFIG=${2:-}
|
||||
NAME=$REDIS_DOCKER_IMAGE
|
||||
|
||||
function show_help() {
|
||||
cat <<EOF
|
||||
Usage: ddev redis-backend <image|alias> [optimize]
|
||||
|
||||
Choose from predefined aliases, or provide any Redis-compatible Docker image.
|
||||
Note that not every Docker image can work right away, and you may need to override
|
||||
the "command:" in the docker-compose.redis_extra.yaml file
|
||||
|
||||
Available aliases:
|
||||
redis redis:7
|
||||
redis-alpine redis:7-alpine
|
||||
valkey valkey/valkey:8
|
||||
valkey-alpine valkey/valkey:8-alpine
|
||||
|
||||
Custom backend:
|
||||
You can specify any Docker image, e.g.:
|
||||
ddev redis-backend redis:6
|
||||
|
||||
Optional:
|
||||
optimize Apply additional Redis configuration with resource limits
|
||||
optimized Same as optimize
|
||||
|
||||
Examples:
|
||||
ddev redis-backend redis-alpine optimize
|
||||
ddev redis-backend valkey
|
||||
ddev redis-backend redis:7.2-alpine
|
||||
EOF
|
||||
exit 0
|
||||
}
|
||||
|
||||
function optimize_config() {
|
||||
[[ "$REDIS_CONFIG" != "optimized" && "$REDIS_CONFIG" != "optimize" ]] && return
|
||||
ddev dotenv set .ddev/.env.redis --redis-optimized=true
|
||||
}
|
||||
|
||||
function change_hostname() {
|
||||
[[ "${REDIS_HOSTNAME:-}" == "" ]] && return
|
||||
ddev dotenv set .ddev/.env.redis --redis-hostname="$REDIS_HOSTNAME"
|
||||
}
|
||||
|
||||
function cleanup() {
|
||||
rm -f "$DDEV_APPROOT/.ddev/.env.redis"
|
||||
rm -rf "$DDEV_APPROOT/.ddev/redis/"
|
||||
rm -f "$DDEV_APPROOT/.ddev/docker-compose.redis.yaml" "$DDEV_APPROOT/.ddev/docker-compose.redis_extra.yaml"
|
||||
|
||||
redis_volume="ddev-$(ddev status -j | docker run -i --rm ddev/ddev-utilities jq -r '.raw.name')_redis"
|
||||
if docker volume ls -q | grep -qw "$redis_volume"; then
|
||||
ddev stop
|
||||
docker volume rm "$redis_volume"
|
||||
fi
|
||||
}
|
||||
|
||||
function check_docker_image() {
|
||||
echo "Pulling ${REDIS_DOCKER_IMAGE}..."
|
||||
if ! docker pull "$REDIS_DOCKER_IMAGE"; then
|
||||
echo >&2 "❌ Unable to pull ${REDIS_DOCKER_IMAGE}"
|
||||
exit 2
|
||||
fi
|
||||
}
|
||||
|
||||
function use_docker_image() {
|
||||
[[ "$REDIS_DOCKER_IMAGE" != "redis:7" ]] && ddev dotenv set .ddev/.env.redis --redis-docker-image="$REDIS_DOCKER_IMAGE"
|
||||
REPO=$(ddev add-on list --installed -j 2>/dev/null | docker run -i --rm ddev/ddev-utilities jq -r '.raw[] | select(.Name=="redis") | .Repository // empty' 2>/dev/null)
|
||||
ddev add-on get "${REPO:-ddev/ddev-redis}"
|
||||
}
|
||||
|
||||
case "$REDIS_DOCKER_IMAGE" in
|
||||
redis)
|
||||
NAME="Redis 7"
|
||||
REDIS_DOCKER_IMAGE="redis:7"
|
||||
;;
|
||||
redis-alpine)
|
||||
NAME="Redis 7 Alpine"
|
||||
REDIS_DOCKER_IMAGE="redis:7-alpine"
|
||||
;;
|
||||
valkey)
|
||||
NAME="Valkey 8"
|
||||
REDIS_DOCKER_IMAGE="valkey/valkey:8"
|
||||
REDIS_HOSTNAME="valkey"
|
||||
;;
|
||||
valkey-alpine)
|
||||
NAME="Valkey 8 Alpine"
|
||||
REDIS_DOCKER_IMAGE="valkey/valkey:8-alpine"
|
||||
REDIS_HOSTNAME="valkey"
|
||||
;;
|
||||
""|--help|-h)
|
||||
show_help
|
||||
;;
|
||||
*)
|
||||
NAME="$REDIS_DOCKER_IMAGE"
|
||||
# Allow unknown image, nothing to override
|
||||
;;
|
||||
esac
|
||||
|
||||
check_docker_image
|
||||
cleanup
|
||||
optimize_config
|
||||
change_hostname
|
||||
use_docker_image
|
||||
|
||||
echo
|
||||
echo "✅ Redis backend: $REDIS_DOCKER_IMAGE"
|
||||
if [[ "$REDIS_CONFIG" == "optimized" || "$REDIS_CONFIG" == "optimize" ]]; then
|
||||
echo "⚙️ Redis config: optimized"
|
||||
else
|
||||
echo "⚙️ Redis config: default"
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "📝 Commit the '.ddev' directory to version control"
|
||||
|
||||
echo
|
||||
echo "🔄 Redis config available after 'ddev restart'"
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
#ddev-generated
|
||||
## Description: Run redis-cli inside the Redis container
|
||||
## Usage: redis-cli [flags] [args]
|
||||
## Example: "ddev redis-cli KEYS *" or "ddev redis-cli INFO" or "ddev redis-cli --version"
|
||||
## Aliases: redis
|
||||
|
||||
if [ -f /etc/redis/conf/security.conf ]; then
|
||||
redis-cli -p 6379 -h "${REDIS_HOSTNAME:-redis}" -a redis --no-auth-warning $@
|
||||
else
|
||||
redis-cli -p 6379 -h "${REDIS_HOSTNAME:-redis}" $@
|
||||
fi
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
#ddev-generated
|
||||
## Description: Flush all cache inside the Redis container
|
||||
## Usage: redis-flush
|
||||
## Example: "ddev redis-flush"
|
||||
|
||||
if [ -f /etc/redis/conf/security.conf ]; then
|
||||
redis-cli -p 6379 -h "${REDIS_HOSTNAME:-redis}" -a redis --no-auth-warning FLUSHALL ASYNC
|
||||
else
|
||||
redis-cli -p 6379 -h "${REDIS_HOSTNAME:-redis}" FLUSHALL ASYNC
|
||||
fi
|
||||
+79
-42
@@ -1,9 +1,8 @@
|
||||
name: ep-reisen
|
||||
type: typo3
|
||||
docroot: public
|
||||
php_version: "7.4"
|
||||
webserver_type: nginx-fpm
|
||||
router_http_port: "80"
|
||||
router_https_port: "443"
|
||||
xdebug_enabled: false
|
||||
additional_hostnames:
|
||||
- ep-events
|
||||
@@ -16,36 +15,58 @@ additional_hostnames:
|
||||
additional_fqdns: []
|
||||
database:
|
||||
type: mariadb
|
||||
version: "10.2"
|
||||
version: "11.4"
|
||||
hooks:
|
||||
post-start:
|
||||
- exec: .ddev/claude-code/install.sh
|
||||
- exec: .ddev/codex-cli/install.sh
|
||||
webimage_extra_packages: [ripgrep, bubblewrap, socat]
|
||||
use_dns_when_possible: true
|
||||
timezone: Europe/Berlin
|
||||
composer_version: "2"
|
||||
web_environment:
|
||||
- TYPO3_CONTEXT=Development
|
||||
nodejs_version: "18"
|
||||
nodejs_version: "24"
|
||||
corepack_enable: false
|
||||
omit_containers: [ddev-ssh-agent]
|
||||
|
||||
# Key features of DDEV's config.yaml:
|
||||
|
||||
# name: <projectname> # Name of the project, automatically provides
|
||||
# http://projectname.ddev.site and https://projectname.ddev.site
|
||||
# If the name is omitted, the project will take the name of the enclosing directory,
|
||||
# which is useful if you want to have a copy of the project side by side with this one.
|
||||
|
||||
# type: <projecttype> # drupal6/7/8, backdrop, typo3, wordpress, php
|
||||
# type: <projecttype> # asterios, backdrop, cakephp, codeigniter, craftcms, drupal, drupal6, drupal7, drupal8, drupal9, drupal10, drupal11, drupal12, generic, joomla, laravel, magento, magento2, maho, modx, php, shopware6, silverstripe, symfony, typo3, wordpress, wp-bedrock
|
||||
# See https://docs.ddev.com/en/stable/users/quickstart/ for more
|
||||
# information on the different project types
|
||||
|
||||
# docroot: <relative_path> # Relative path to the directory containing index.php.
|
||||
|
||||
# php_version: "8.1" # PHP version to use, "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"
|
||||
# php_version: "8.4" # PHP version to use, "5.6" through "8.5"
|
||||
|
||||
# You can explicitly specify the webimage but this
|
||||
# is not recommended, as the images are often closely tied to DDEV's' behavior,
|
||||
# is not recommended, as the images are often closely tied to DDEV's behavior,
|
||||
# so this can break upgrades.
|
||||
|
||||
# webimage: <docker_image> # nginx/php docker image.
|
||||
# webimage: <docker_image>
|
||||
# It’s unusual to change this option, and we don’t recommend it without Docker experience and a good reason.
|
||||
# Typically, this means additions to the existing web image using a .ddev/web-build/Dockerfile.*
|
||||
|
||||
# database:
|
||||
# type: <dbtype> # mysql, mariadb, postgres
|
||||
# version: <version> # database version, like "10.4" or "8.0"
|
||||
# MariaDB versions can be 5.5-10.8 and 10.11, MySQL versions can be 5.5-8.0
|
||||
# PostgreSQL versions can be 9-16.
|
||||
# version: <version> # database version, like "10.11" or "8.0"
|
||||
# MariaDB versions can be 5.5-10.8, 10.11, 11.4, 11.8, 12.3
|
||||
# MySQL versions can be 5.5-8.0, 8.4, 9.7
|
||||
# PostgreSQL versions can be 9-18
|
||||
|
||||
# You can explicitly specify the dbimage but this
|
||||
# is not recommended, as the images are often closely tied to DDEV's behavior,
|
||||
# so this can break upgrades.
|
||||
|
||||
# dbimage: <docker_image>
|
||||
# It’s unusual to change this option, and we don’t recommend it without Docker experience and a good reason.
|
||||
# Typically, this means additions to the existing db image using a .ddev/db-build/Dockerfile.*
|
||||
|
||||
# router_http_port: <port> # Port to be used for http (defaults to global configuration, usually 80)
|
||||
# router_https_port: <port> # Port for https (defaults to global configuration, usually 443)
|
||||
@@ -55,14 +76,24 @@ nodejs_version: "18"
|
||||
# "ddev xdebug" to enable Xdebug and "ddev xdebug off" to disable it work better,
|
||||
# as leaving Xdebug enabled all the time is a big performance hit.
|
||||
|
||||
# xhprof_enabled: false # Set to true to enable Xhprof and "ddev start" or "ddev restart"
|
||||
# Note that for most people the commands
|
||||
# "ddev xhprof" to enable Xhprof and "ddev xhprof off" to disable it work better,
|
||||
# as leaving Xhprof enabled all the time is a big performance hit.
|
||||
# xhgui_http_port: "8143"
|
||||
# xhgui_https_port: "8142"
|
||||
# The XHGui ports can be changed from the default 8143 and 8142
|
||||
# Very rarely used
|
||||
|
||||
# webserver_type: nginx-fpm, apache-fpm, or nginx-gunicorn
|
||||
# host_xhgui_port: "8142"
|
||||
# Can be used to change the host binding port of the XHGui
|
||||
# application. Rarely used; only when port conflict and
|
||||
# bind_all_ports is used (normally with router disabled)
|
||||
|
||||
# xhprof_mode: [prepend|xhgui|global]
|
||||
# Default is "xhgui"
|
||||
|
||||
# webserver_type: nginx-fpm, apache-fpm, generic
|
||||
|
||||
# timezone: Europe/Berlin
|
||||
# If timezone is unset, DDEV will attempt to derive it from the host system timezone
|
||||
# using the $TZ environment variable or the /etc/localtime symlink.
|
||||
# This is the timezone used in the containers and by PHP;
|
||||
# it can be set to any valid timezone,
|
||||
# see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||
@@ -74,22 +105,27 @@ nodejs_version: "18"
|
||||
# commands are executed.
|
||||
|
||||
# composer_version: "2"
|
||||
# You can set it to "" or "2" (default) for Composer v2 or "1" for Composer v1
|
||||
# You can set it to "" or "2" (default) for Composer v2
|
||||
# to use the latest major version available at the time your container is built.
|
||||
# It is also possible to use each other Composer version channel. This includes:
|
||||
# It is also possible to use any other Composer version channel. This includes:
|
||||
# - 2.2 (latest Composer LTS version)
|
||||
# - stable
|
||||
# - preview
|
||||
# - snapshot
|
||||
# Alternatively, an explicit Composer version may be specified, for example "2.2.18".
|
||||
# To reinstall Composer after the image was built, run "ddev debug refresh".
|
||||
# To reinstall Composer after the image was built, run "ddev utility rebuild".
|
||||
|
||||
# nodejs_version: "18"
|
||||
# change from the default system Node.js version to another supported version, like 16, 18, 20.
|
||||
# Note that you can use 'ddev nvm' or nvm inside the web container to provide nearly any
|
||||
# Node.js version, including v6, etc.
|
||||
# You only need to configure this if you are not using nvm and you want to use a major
|
||||
# version that is not the default.
|
||||
# nodejs_root: <relative_path>
|
||||
# Relative path to the directory containing the Node.js version file from the
|
||||
# project root. Only used with "nodejs_version: auto" or "nodejs_version: engine".
|
||||
|
||||
# nodejs_version: "24"
|
||||
# change from the default system Node.js version to any other version.
|
||||
# See https://docs.ddev.com/en/stable/users/configuration/config/#nodejs_version for more information
|
||||
# and https://www.npmjs.com/package/n#specifying-nodejs-versions for the full documentation.
|
||||
|
||||
# corepack_enable: false
|
||||
# Change to 'true' to 'corepack enable' and gain access to latest versions of yarn/pnpm
|
||||
|
||||
# additional_hostnames:
|
||||
# - somename
|
||||
@@ -119,7 +155,7 @@ nodejs_version: "18"
|
||||
|
||||
# ddev_version_constraint: ""
|
||||
# Example:
|
||||
# ddev_version_constraint: ">= 1.22.4"
|
||||
# ddev_version_constraint: ">= 1.24.8"
|
||||
# This will enforce that the running ddev version is within this constraint.
|
||||
# See https://github.com/Masterminds/semver#checking-version-constraints for
|
||||
# supported constraint formats
|
||||
@@ -146,10 +182,8 @@ nodejs_version: "18"
|
||||
# - "global": uses the value from the global config.
|
||||
# - "none": disables performance optimization for this project.
|
||||
# - "mutagen": enables Mutagen for this project.
|
||||
# - "nfs": enables NFS for this project.
|
||||
#
|
||||
# See https://ddev.readthedocs.io/en/latest/users/install/performance/#nfs
|
||||
# See https://ddev.readthedocs.io/en/latest/users/install/performance/#mutagen
|
||||
# See https://docs.ddev.com/en/stable/users/install/performance/#mutagen
|
||||
|
||||
# fail_on_hook_fail: False
|
||||
# Decide whether 'ddev start' should be interrupted by a failing hook
|
||||
@@ -178,10 +212,10 @@ nodejs_version: "18"
|
||||
# The mailpit port is not normally bound on the host at all, instead being routed
|
||||
# through ddev-router, but it can be bound directly to localhost if specified here.
|
||||
|
||||
# webimage_extra_packages: [php7.4-tidy, php-bcmath]
|
||||
# webimage_extra_packages: ['php${DDEV_PHP_VERSION}-tidy', 'php${DDEV_PHP_VERSION}-yac']
|
||||
# Extra Debian packages that are needed in the webimage can be added here
|
||||
|
||||
# dbimage_extra_packages: [telnet,netcat]
|
||||
# dbimage_extra_packages: [netcat, telnet, sudo]
|
||||
# Extra Debian packages that are needed in the dbimage can be added here
|
||||
|
||||
# use_dns_when_possible: true
|
||||
@@ -193,22 +227,25 @@ nodejs_version: "18"
|
||||
# project_tld: ddev.site
|
||||
# The top-level domain used for project URLs
|
||||
# The default "ddev.site" allows DNS lookup via a wildcard
|
||||
# If you prefer you can change this to "ddev.local" to preserve
|
||||
# pre-v1.9 behavior.
|
||||
|
||||
# ngrok_args: --basic-auth username:pass1234
|
||||
# Provide extra flags to the "ngrok http" command, see
|
||||
# https://ngrok.com/docs/ngrok-agent/config or run "ngrok http -h"
|
||||
# share_default_provider: ngrok
|
||||
# The default share provider to use for "ddev share"
|
||||
# Defaults to global configuration, usually "ngrok"
|
||||
# Can be "ngrok" or "cloudflared" or the name of a custom provider from .ddev/share-providers/
|
||||
|
||||
# share_provider_args: --basic-auth username:pass1234
|
||||
# Provide extra flags to the share provider script
|
||||
# See https://docs.ddev.com/en/stable/users/configuration/config/#share_provider_args
|
||||
|
||||
# disable_settings_management: false
|
||||
# If true, DDEV will not create CMS-specific settings files like
|
||||
# Drupal's settings.php/settings.ddev.php or TYPO3's AdditionalConfiguration.php
|
||||
# Drupal's settings.php/settings.ddev.php or TYPO3's additional.php
|
||||
# In this case the user must provide all such settings.
|
||||
|
||||
# You can inject environment variables into the web container with:
|
||||
# web_environment:
|
||||
# - SOMEENV=somevalue
|
||||
# - SOMEOTHERENV=someothervalue
|
||||
# - SOMEENV=somevalue
|
||||
# - SOMEOTHERENV=someothervalue
|
||||
|
||||
# no_project_mount: false
|
||||
# (Experimental) If true, DDEV will not mount the project into the web container;
|
||||
@@ -260,7 +297,7 @@ nodejs_version: "18"
|
||||
# override_config: false
|
||||
# By default, config.*.yaml files are *merged* into the configuration
|
||||
# But this means that some things can't be overridden
|
||||
# For example, if you have 'use_dns_when_possible: true'' you can't override it with a merge
|
||||
# For example, if you have 'use_dns_when_possible: true' you can't override it with a merge
|
||||
# and you can't erase existing hooks or all environment variables.
|
||||
# However, with "override_config: true" in a particular config.*.yaml file,
|
||||
# 'use_dns_when_possible: false' can override the existing values, and
|
||||
@@ -270,13 +307,13 @@ nodejs_version: "18"
|
||||
# web_environment: []
|
||||
# or
|
||||
# additional_hostnames: []
|
||||
# can have their intended affect. 'override_config' affects only behavior of the
|
||||
# can have their intended effect. 'override_config' affects only behavior of the
|
||||
# config.*.yaml file it exists in.
|
||||
|
||||
# Many DDEV commands can be extended to run tasks before or after the
|
||||
# DDEV command is executed, for example "post-start", "post-import-db",
|
||||
# "pre-composer", "post-composer"
|
||||
# See https://ddev.readthedocs.io/en/stable/users/extend/custom-commands/ for more
|
||||
# See https://docs.ddev.com/en/stable/users/extend/custom-commands/ for more
|
||||
# information on the commands that can be extended and the tasks you can define
|
||||
# for them. Example:
|
||||
#hooks:
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
#ddev-generated
|
||||
services:
|
||||
redis:
|
||||
container_name: ddev-${DDEV_SITENAME}-redis
|
||||
image: ${REDIS_DOCKER_IMAGE:-redis:7}
|
||||
hostname: ${REDIS_HOSTNAME:-redis}
|
||||
# These labels ensure this service is discoverable by ddev.
|
||||
labels:
|
||||
com.ddev.site-name: ${DDEV_SITENAME}
|
||||
com.ddev.approot: ${DDEV_APPROOT}
|
||||
restart: "no"
|
||||
expose:
|
||||
- 6379
|
||||
volumes:
|
||||
- ".:/mnt/ddev_config"
|
||||
- "ddev-global-cache:/mnt/ddev-global-cache"
|
||||
- "./redis:/etc/redis/conf"
|
||||
- "redis:/data"
|
||||
command: /etc/redis/conf/redis.conf
|
||||
x-ddev:
|
||||
describe-url-port: |
|
||||
Backend: ${REDIS_DOCKER_IMAGE:-redis:7}
|
||||
describe-info: |
|
||||
Pass: <none>
|
||||
|
||||
volumes:
|
||||
redis:
|
||||
@@ -0,0 +1,13 @@
|
||||
# Redis configuration.
|
||||
# #ddev-generated
|
||||
# Example configuration files for reference:
|
||||
# http://download.redis.io/redis-stable/redis.conf
|
||||
# http://download.redis.io/redis-stable/sentinel.conf
|
||||
|
||||
maxmemory 128mb
|
||||
maxmemory-policy allkeys-lru
|
||||
|
||||
# to disable Redis persistence, remove ddev-generated from this file,
|
||||
# and uncomment the two lines below:
|
||||
#appendonly no
|
||||
#save ""
|
||||
@@ -15,7 +15,6 @@ public/typo3conf/ext/*/
|
||||
public/typo3conf/ext/ep_events/Resources/Public/
|
||||
public/typo3conf/ext/ep_theme/Resources/Public/
|
||||
public/typo3conf/LocalConfiguration.php
|
||||
public/typo3conf/AdditionalConfiguration.php
|
||||
public/typo3conf/PackageStates.php
|
||||
public/typo3conf/l10n
|
||||
public/typo3temp
|
||||
|
||||
-3284
File diff suppressed because it is too large
Load Diff
+4
-1
@@ -15,6 +15,7 @@
|
||||
"ext-json": "*",
|
||||
"ext-libxml": "*",
|
||||
"ext-pdo": "*",
|
||||
"ext-redis": "*",
|
||||
"ext-simplexml": "*",
|
||||
"b13/container": "^1.3",
|
||||
"blueways/bw-captcha": "^3.1",
|
||||
@@ -24,11 +25,13 @@
|
||||
"georgringer/news": "^8.5",
|
||||
"gridelementsteam/gridelements": "^10.0",
|
||||
"helhum/typo3-console": "^6.4",
|
||||
"jweiland/replacer": "^2.1",
|
||||
"kigkonsult/icalcreator": "^2.29",
|
||||
"league/csv": "^9.2",
|
||||
"league/oauth2-client": "^2.8",
|
||||
"league/period": "^4.9",
|
||||
"lochmueller/staticfilecache": "^12.5",
|
||||
"phpseclib/phpseclib": "^3.0",
|
||||
"sjbr/sr-freecap": "2.6.0",
|
||||
"ssch/typo3-encore": "^3.0",
|
||||
"symfony/http-client": "^4.3",
|
||||
@@ -95,7 +98,7 @@
|
||||
"config": {
|
||||
"sort-packages": true,
|
||||
"platform": {
|
||||
"php": "7.4.13"
|
||||
"php": "7.4.33"
|
||||
},
|
||||
"allow-plugins": {
|
||||
"typo3/cms-composer-installers": true,
|
||||
|
||||
Generated
+332
-37
@@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "f0ff2587673ce0da1d0d53cc382a0922",
|
||||
"content-hash": "38fb94ebf504e8413d37c94f929e4b47",
|
||||
"packages": [
|
||||
{
|
||||
"name": "b13/container",
|
||||
@@ -1583,6 +1583,72 @@
|
||||
],
|
||||
"time": "2023-01-08T21:22:53+00:00"
|
||||
},
|
||||
{
|
||||
"name": "jweiland/replacer",
|
||||
"version": "2.1.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/jweiland-net/replacer.git",
|
||||
"reference": "feec487ea9c3573d1e8d80245dd9763352492357"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/jweiland-net/replacer/zipball/feec487ea9c3573d1e8d80245dd9763352492357",
|
||||
"reference": "feec487ea9c3573d1e8d80245dd9763352492357",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"typo3/cms-core": "^9.5 || ^10.4 || ^11.0"
|
||||
},
|
||||
"replace": {
|
||||
"typo3-ter/replacer": "self.version"
|
||||
},
|
||||
"require-dev": {
|
||||
"friendsofphp/php-cs-fixer": "^3.0",
|
||||
"nimut/testing-framework": "^6.0",
|
||||
"phpspec/prophecy-phpunit": "^2.0",
|
||||
"phpunit/phpunit": "^9.5",
|
||||
"roave/security-advisories": "dev-latest"
|
||||
},
|
||||
"type": "typo3-cms-extension",
|
||||
"extra": {
|
||||
"typo3/cms": {
|
||||
"app-dir": ".build",
|
||||
"web-dir": ".build/public",
|
||||
"extension-key": "replacer"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"JWeiland\\Replacer\\": "Classes"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"GPL-2.0-or-later"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Pascal Rinker",
|
||||
"email": "[email protected]",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"description": "Replaces string patterns from the page. You can use it to replace URLs for Content Delivery Network (CDN).",
|
||||
"homepage": "http://www.jweiland.net",
|
||||
"keywords": [
|
||||
"TYPO3 CMS",
|
||||
"jw",
|
||||
"replacer",
|
||||
"typo3"
|
||||
],
|
||||
"support": {
|
||||
"email": "[email protected]",
|
||||
"issues": "https://github.com/jweiland-net/replacer/issues",
|
||||
"source": "https://github.com/jweiland-net/replacer"
|
||||
},
|
||||
"time": "2022-06-02T09:29:20+00:00"
|
||||
},
|
||||
{
|
||||
"name": "kigkonsult/icalcreator",
|
||||
"version": "v2.39.2",
|
||||
@@ -1751,21 +1817,22 @@
|
||||
},
|
||||
{
|
||||
"name": "league/oauth2-client",
|
||||
"version": "2.9.0",
|
||||
"version": "2.9.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/oauth2-client.git",
|
||||
"reference": "26e8c5da4f3d78cede7021e09b1330a0fc093d5e"
|
||||
"reference": "8cedfef9d01a8d1fd2ecfabb41734b17592c4b71"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/oauth2-client/zipball/26e8c5da4f3d78cede7021e09b1330a0fc093d5e",
|
||||
"reference": "26e8c5da4f3d78cede7021e09b1330a0fc093d5e",
|
||||
"url": "https://api.github.com/repos/thephpleague/oauth2-client/zipball/8cedfef9d01a8d1fd2ecfabb41734b17592c4b71",
|
||||
"reference": "8cedfef9d01a8d1fd2ecfabb41734b17592c4b71",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-json": "*",
|
||||
"guzzlehttp/guzzle": "^6.5.8 || ^7.4.5",
|
||||
"guzzlehttp/guzzle": "^6.5.8 || ^7.8.2 || ^8.0",
|
||||
"guzzlehttp/psr7": "^1.9.1 || ^2.6.3 || ^3.0",
|
||||
"php": "^7.1 || >=8.0.0 <8.6.0"
|
||||
},
|
||||
"require-dev": {
|
||||
@@ -1810,9 +1877,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/thephpleague/oauth2-client/issues",
|
||||
"source": "https://github.com/thephpleague/oauth2-client/tree/2.9.0"
|
||||
"source": "https://github.com/thephpleague/oauth2-client/tree/2.9.1"
|
||||
},
|
||||
"time": "2025-11-25T22:17:17+00:00"
|
||||
"time": "2026-09-16T13:14:31+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/period",
|
||||
@@ -2055,24 +2122,24 @@
|
||||
},
|
||||
{
|
||||
"name": "masterminds/html5",
|
||||
"version": "2.10.1",
|
||||
"version": "2.11.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Masterminds/html5-php.git",
|
||||
"reference": "fd5018f6815fff903946d0564977b44ce8010e29"
|
||||
"reference": "a1e7a2f88ee13635d86fc61cfbdf2306a76ddfc7"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/Masterminds/html5-php/zipball/fd5018f6815fff903946d0564977b44ce8010e29",
|
||||
"reference": "fd5018f6815fff903946d0564977b44ce8010e29",
|
||||
"url": "https://api.github.com/repos/Masterminds/html5-php/zipball/a1e7a2f88ee13635d86fc61cfbdf2306a76ddfc7",
|
||||
"reference": "a1e7a2f88ee13635d86fc61cfbdf2306a76ddfc7",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-dom": "*",
|
||||
"php": ">=5.3.0"
|
||||
"php": ">=7.4"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.8.35 || ^5.7.21 || ^6 || ^7 || ^8 || ^9 || ^10"
|
||||
"phpunit/phpunit": "^6 || ^7 || ^8 || ^9 || ^10"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
@@ -2116,9 +2183,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/Masterminds/html5-php/issues",
|
||||
"source": "https://github.com/Masterminds/html5-php/tree/2.10.1"
|
||||
"source": "https://github.com/Masterminds/html5-php/tree/2.11.0"
|
||||
},
|
||||
"time": "2026-06-23T18:43:15+00:00"
|
||||
"time": "2026-08-18T06:18:41+00:00"
|
||||
},
|
||||
{
|
||||
"name": "nikic/php-parser",
|
||||
@@ -2171,6 +2238,123 @@
|
||||
},
|
||||
"time": "2025-12-06T11:45:25+00:00"
|
||||
},
|
||||
{
|
||||
"name": "paragonie/constant_time_encoding",
|
||||
"version": "v2.8.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/paragonie/constant_time_encoding.git",
|
||||
"reference": "e30811f7bc69e4b5b6d5783e712c06c8eabf0226"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/e30811f7bc69e4b5b6d5783e712c06c8eabf0226",
|
||||
"reference": "e30811f7bc69e4b5b6d5783e712c06c8eabf0226",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7|^8"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^6|^7|^8|^9",
|
||||
"vimeo/psalm": "^1|^2|^3|^4"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"ParagonIE\\ConstantTime\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Paragon Initiative Enterprises",
|
||||
"email": "[email protected]",
|
||||
"homepage": "https://paragonie.com",
|
||||
"role": "Maintainer"
|
||||
},
|
||||
{
|
||||
"name": "Steve 'Sc00bz' Thomas",
|
||||
"email": "[email protected]",
|
||||
"homepage": "https://www.tobtu.com",
|
||||
"role": "Original Developer"
|
||||
}
|
||||
],
|
||||
"description": "Constant-time Implementations of RFC 4648 Encoding (Base-64, Base-32, Base-16)",
|
||||
"keywords": [
|
||||
"base16",
|
||||
"base32",
|
||||
"base32_decode",
|
||||
"base32_encode",
|
||||
"base64",
|
||||
"base64_decode",
|
||||
"base64_encode",
|
||||
"bin2hex",
|
||||
"encoding",
|
||||
"hex",
|
||||
"hex2bin",
|
||||
"rfc4648"
|
||||
],
|
||||
"support": {
|
||||
"email": "[email protected]",
|
||||
"issues": "https://github.com/paragonie/constant_time_encoding/issues",
|
||||
"source": "https://github.com/paragonie/constant_time_encoding"
|
||||
},
|
||||
"time": "2025-09-24T15:12:37+00:00"
|
||||
},
|
||||
{
|
||||
"name": "paragonie/random_compat",
|
||||
"version": "v9.99.100",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/paragonie/random_compat.git",
|
||||
"reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/paragonie/random_compat/zipball/996434e5492cb4c3edcb9168db6fbb1359ef965a",
|
||||
"reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">= 7"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "4.*|5.*",
|
||||
"vimeo/psalm": "^1"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes."
|
||||
},
|
||||
"type": "library",
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Paragon Initiative Enterprises",
|
||||
"email": "[email protected]",
|
||||
"homepage": "https://paragonie.com"
|
||||
}
|
||||
],
|
||||
"description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7",
|
||||
"keywords": [
|
||||
"csprng",
|
||||
"polyfill",
|
||||
"pseudorandom",
|
||||
"random"
|
||||
],
|
||||
"support": {
|
||||
"email": "[email protected]",
|
||||
"issues": "https://github.com/paragonie/random_compat/issues",
|
||||
"source": "https://github.com/paragonie/random_compat"
|
||||
},
|
||||
"time": "2020-10-15T08:29:30+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpdocumentor/reflection-common",
|
||||
"version": "2.2.0",
|
||||
@@ -2347,17 +2531,127 @@
|
||||
"time": "2025-11-21T15:09:14+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpstan/phpdoc-parser",
|
||||
"version": "2.3.3",
|
||||
"name": "phpseclib/phpseclib",
|
||||
"version": "3.0.57",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpstan/phpdoc-parser.git",
|
||||
"reference": "fb19eedd2bb67ff8cf7a5502ad329e701d6398a3"
|
||||
"url": "https://github.com/phpseclib/phpseclib.git",
|
||||
"reference": "d17e0ddaeaf6f22f7e007cbb437d78792fe2a0e4"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/fb19eedd2bb67ff8cf7a5502ad329e701d6398a3",
|
||||
"reference": "fb19eedd2bb67ff8cf7a5502ad329e701d6398a3",
|
||||
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/d17e0ddaeaf6f22f7e007cbb437d78792fe2a0e4",
|
||||
"reference": "d17e0ddaeaf6f22f7e007cbb437d78792fe2a0e4",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"paragonie/constant_time_encoding": "^1|^2|^3",
|
||||
"paragonie/random_compat": "^1.4|^2.0|^9.99.99",
|
||||
"php": ">=5.6.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "*"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-dom": "Install the DOM extension to load XML formatted public keys.",
|
||||
"ext-gmp": "Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.",
|
||||
"ext-libsodium": "SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.",
|
||||
"ext-mcrypt": "Install the Mcrypt extension in order to speed up a few other cryptographic operations.",
|
||||
"ext-openssl": "Install the OpenSSL extension in order to speed up a wide variety of cryptographic operations."
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"files": [
|
||||
"phpseclib/bootstrap.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"phpseclib3\\": "phpseclib/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Jim Wigginton",
|
||||
"email": "[email protected]",
|
||||
"role": "Lead Developer"
|
||||
},
|
||||
{
|
||||
"name": "Patrick Monnerat",
|
||||
"email": "[email protected]",
|
||||
"role": "Developer"
|
||||
},
|
||||
{
|
||||
"name": "Andreas Fischer",
|
||||
"email": "[email protected]",
|
||||
"role": "Developer"
|
||||
},
|
||||
{
|
||||
"name": "Hans-Jürgen Petrich",
|
||||
"email": "[email protected]",
|
||||
"role": "Developer"
|
||||
},
|
||||
{
|
||||
"name": "Graham Campbell",
|
||||
"email": "[email protected]",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"description": "PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.",
|
||||
"homepage": "http://phpseclib.sourceforge.net",
|
||||
"keywords": [
|
||||
"BigInteger",
|
||||
"aes",
|
||||
"asn.1",
|
||||
"asn1",
|
||||
"blowfish",
|
||||
"crypto",
|
||||
"cryptography",
|
||||
"encryption",
|
||||
"rsa",
|
||||
"security",
|
||||
"sftp",
|
||||
"signature",
|
||||
"signing",
|
||||
"ssh",
|
||||
"twofish",
|
||||
"x.509",
|
||||
"x509"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/phpseclib/phpseclib/issues",
|
||||
"source": "https://github.com/phpseclib/phpseclib/tree/3.0.57"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/terrafrost",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://www.patreon.com/phpseclib",
|
||||
"type": "patreon"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/phpseclib/phpseclib",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2026-08-26T12:13:21+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpstan/phpdoc-parser",
|
||||
"version": "2.3.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpstan/phpdoc-parser.git",
|
||||
"reference": "148cefffaf0233e4c08cc13db8a195a56dd6dfe9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/148cefffaf0233e4c08cc13db8a195a56dd6dfe9",
|
||||
"reference": "148cefffaf0233e4c08cc13db8a195a56dd6dfe9",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2389,9 +2683,9 @@
|
||||
"description": "PHPDoc parser with support for nullable, intersection and generic types",
|
||||
"support": {
|
||||
"issues": "https://github.com/phpstan/phpdoc-parser/issues",
|
||||
"source": "https://github.com/phpstan/phpdoc-parser/tree/2.3.3"
|
||||
"source": "https://github.com/phpstan/phpdoc-parser/tree/2.3.5"
|
||||
},
|
||||
"time": "2026-07-08T07:01:06+00:00"
|
||||
"time": "2026-08-31T16:05:28+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/cache",
|
||||
@@ -4817,16 +5111,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-intl-idn",
|
||||
"version": "v1.38.1",
|
||||
"version": "v1.42.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-intl-idn.git",
|
||||
"reference": "dc21118016c039a66235cf93d96b435ffb282412"
|
||||
"reference": "51b5ff5ba85452b31ec6f55490b08148612339d9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/dc21118016c039a66235cf93d96b435ffb282412",
|
||||
"reference": "dc21118016c039a66235cf93d96b435ffb282412",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/51b5ff5ba85452b31ec6f55490b08148612339d9",
|
||||
"reference": "51b5ff5ba85452b31ec6f55490b08148612339d9",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -4880,7 +5174,7 @@
|
||||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.38.1"
|
||||
"source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.42.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -4900,20 +5194,20 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2026-05-25T15:22:23+00:00"
|
||||
"time": "2026-08-24T10:51:20+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-intl-normalizer",
|
||||
"version": "v1.38.0",
|
||||
"version": "v1.42.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-intl-normalizer.git",
|
||||
"reference": "2d446c214bdbe5b71bde5011b060a05fece3ae6b"
|
||||
"reference": "aa20edea75bd9c48cfecc8360922e5a6e5c44502"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/2d446c214bdbe5b71bde5011b060a05fece3ae6b",
|
||||
"reference": "2d446c214bdbe5b71bde5011b060a05fece3ae6b",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/aa20edea75bd9c48cfecc8360922e5a6e5c44502",
|
||||
"reference": "aa20edea75bd9c48cfecc8360922e5a6e5c44502",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -4965,7 +5259,7 @@
|
||||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.38.0"
|
||||
"source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.42.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -4985,7 +5279,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2026-05-25T13:48:31+00:00"
|
||||
"time": "2026-08-07T06:33:24+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-mbstring",
|
||||
@@ -9354,11 +9648,12 @@
|
||||
"ext-json": "*",
|
||||
"ext-libxml": "*",
|
||||
"ext-pdo": "*",
|
||||
"ext-redis": "*",
|
||||
"ext-simplexml": "*"
|
||||
},
|
||||
"platform-dev": {},
|
||||
"platform-overrides": {
|
||||
"php": "7.4.13"
|
||||
"php": "7.4.33"
|
||||
},
|
||||
"plugin-api-version": "2.9.0"
|
||||
}
|
||||
|
||||
+17
-39
@@ -25,6 +25,7 @@ add('shared_dirs', [
|
||||
$rsyncOptions = [
|
||||
'exclude' => [
|
||||
'.ddev',
|
||||
'.claude',
|
||||
'.DS_Store',
|
||||
'.git',
|
||||
'.github',
|
||||
@@ -56,68 +57,45 @@ $rsyncOptions = [
|
||||
'timeout' => 300,
|
||||
];
|
||||
|
||||
host('production')
|
||||
->setHostname('185.237.67.190')
|
||||
->setRemoteUser('p546128')
|
||||
host('prod')
|
||||
->setHostname('dedi10193.your-server.de')
|
||||
->setRemoteUser('eptypo3')
|
||||
->setForwardAgent(true)
|
||||
->setSshMultiplexing(true)
|
||||
->setDeployPath('/home/www/p546128/html/{{application}}')
|
||||
->set('buspronet_path', '/home/www/p546128/html/kuschick/buspronet/buspronet')
|
||||
->set('bin/php', '/usr/local/bin/php')
|
||||
->set('http_user', 'p546128')
|
||||
->setDeployPath('/usr/home/eptypo3/public_html/{{application}}')
|
||||
->set('bin/php', '/usr/bin/php74')
|
||||
->set('http_user', 'eptypo3')
|
||||
->set('writable_mode', 'chmod')
|
||||
->set('bin/composer', '/usr/local/bin/composer')
|
||||
->set('composer_options', '--prefer-dist --no-progress --no-interaction --optimize-autoloader')
|
||||
->set('rsync_src', __DIR__)
|
||||
->set('rsync', $rsyncOptions)
|
||||
->set('cachetool_args', '--web=SymfonyHttpClient --web-path={{current_path}}/public/ --web-url=https://www.ep-reisen.de')
|
||||
;
|
||||
|
||||
$sharedFilesStaging = get('shared_files');
|
||||
$sharedFilesStaging[] = '{{typo3_webroot}}/.htpasswd';
|
||||
|
||||
host('staging')
|
||||
->setHostname('185.237.67.190')
|
||||
->setRemoteUser('p546128')
|
||||
->setForwardAgent(true)
|
||||
->setSshMultiplexing(true)
|
||||
->setDeployPath('/home/www/p546128/html/{{application}}-staging')
|
||||
->set('buspronet_path', '/home/www/p546128/html/kuschick/buspronet/buspronet')
|
||||
->set('bin/php', '/usr/local/bin/php')
|
||||
->set('http_user', 'p546128')
|
||||
->set('writable_mode', 'chmod')
|
||||
->set('bin/composer', '/usr/local/bin/composer')
|
||||
->set('composer_options', '--prefer-dist --no-progress --no-interaction --optimize-autoloader')
|
||||
->set('rsync_src', __DIR__)
|
||||
->set('rsync', $rsyncOptions)
|
||||
->set('cachetool_args', '--web=SymfonyHttpClient --web-path={{current_path}}/public/ --web-url=https://staging.ep-reisen.de --web-basic-auth=ep:reisen')
|
||||
->set('shared_files', $sharedFilesStaging)
|
||||
->set('cachetool_args', '--web=SymfonyHttpClient --web-path={{current_path}}/{{typo3_webroot}}/ --web-url=https://www.ep-reisen.de')
|
||||
;
|
||||
|
||||
task('deploy', [
|
||||
'deploy:info',
|
||||
// Build locally first, so a failing build aborts before the server is touched at all.
|
||||
'deploy:assets:build',
|
||||
'deploy:setup',
|
||||
'deploy:lock',
|
||||
'deploy:release',
|
||||
'deploy:assets:build',
|
||||
'rsync',
|
||||
'deploy:shared',
|
||||
'deploy:writable',
|
||||
// The schema has to exist before the new code starts serving traffic.
|
||||
'typo3:database:migrate',
|
||||
'typo3:language:update',
|
||||
// deploy:publish == deploy:symlink, deploy:unlock, deploy:cleanup, deploy:success
|
||||
'deploy:publish',
|
||||
'cachetool:clear:opcache',
|
||||
'typo3:cache:flush',
|
||||
'deploy:buspronet:symlink',
|
||||
]);
|
||||
|
||||
task('deploy:buspronet:symlink', function () {
|
||||
run('ln -s {{buspronet_path}} {{release_or_current_path}}/public/buchung');
|
||||
});
|
||||
// Caches belong to the release that goes live, so they are cleared after the symlink flip. Hooking
|
||||
// into deploy:symlink rather than appending to the list above keeps them inside deploy:publish, ahead
|
||||
// of deploy:unlock and deploy:success - a failing cache task must not follow a declared success.
|
||||
after('deploy:symlink', 'cachetool:clear:opcache');
|
||||
after('deploy:symlink', 'typo3:cache:flush');
|
||||
|
||||
task ('deploy:assets:build', function () {
|
||||
runLocally('ddev exec npm ci');
|
||||
runLocally('ddev exec npm rebuild node-sass');
|
||||
runLocally('ddev exec npm run build');
|
||||
});
|
||||
|
||||
|
||||
Generated
+1415
-1608
File diff suppressed because it is too large
Load Diff
+9
-23
@@ -1,62 +1,48 @@
|
||||
{
|
||||
"name": "eptheme",
|
||||
"description": "EP Reisen TYPO3 website package",
|
||||
"version": "3.0.0",
|
||||
"author": "Björn Fromme, [email protected]",
|
||||
"license": "proprietary",
|
||||
"scripts": {
|
||||
"dev": "./node_modules/.bin/encore dev --watch",
|
||||
"build": "NODE_ENV=production ./node_modules/.bin/encore production"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16"
|
||||
"node": ">=20.19.0"
|
||||
},
|
||||
"browserslist": [
|
||||
"defaults"
|
||||
],
|
||||
"dependencies": {
|
||||
"@hotwired/stimulus": "^3.2.1",
|
||||
"@hotwired/stimulus-webpack-helpers": "^1.0.1",
|
||||
"@iframe-resizer/parent": "^5.3.2",
|
||||
"@splidejs/splide": "^2.4.21",
|
||||
"axios": "^1.6.2",
|
||||
"cooltipz-css": "^1.6.8",
|
||||
"dayjs": "^1.10.6",
|
||||
"es6-slide-up-down": "^1.0.0",
|
||||
"flatpickr": "^4.6.9",
|
||||
"glightbox": "^3.0.9",
|
||||
"htmx.org": "^1.9.12",
|
||||
"jquery": "^3.6.0",
|
||||
"lazysizes": "^5.3.2",
|
||||
"leaflet": "^1.7.1",
|
||||
"normalize.css": "^8.0.1",
|
||||
"picturefill": "^3.0.3",
|
||||
"slick-carousel": "^1.8.1",
|
||||
"sticky-js": "^1.3.0",
|
||||
"stimulus-use": "^0.52.0",
|
||||
"vue": "^2.6.14",
|
||||
"vue-router": "^3.5.2",
|
||||
"vue-session": "^1.0.0",
|
||||
"vuex": "^3.6.2",
|
||||
"whatwg-fetch": "^3.6.2"
|
||||
"vue-session": "^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/plugin-proposal-object-rest-spread": "^7.16.0",
|
||||
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
||||
"@babel/preset-env": "^7.16.0",
|
||||
"@symfony/webpack-encore": "^2.1.0",
|
||||
"@symfony/webpack-encore": "^4.7.0",
|
||||
"@tailwindcss/aspect-ratio": "^0.4.0",
|
||||
"@tailwindcss/forms": "^0.5.2",
|
||||
"autoprefixer": "^10.4.8",
|
||||
"core-js": "^3.22.5",
|
||||
"document-register-element": "^1.14.10",
|
||||
"file-loader": "^6.2.0",
|
||||
"postcss": "^8.4.16",
|
||||
"postcss-loader": "^6.2.1",
|
||||
"postcss-loader": "^8.2.1",
|
||||
"sass": "^1.53.0",
|
||||
"sass-loader": "^12.6.0",
|
||||
"sass-mq": "^6.0.0",
|
||||
"smoothscroll-polyfill": "^0.4.4",
|
||||
"sass-loader": "^14.2.1",
|
||||
"sass-mq": "^7.0.1",
|
||||
"tailwindcss": "^3.1.8",
|
||||
"tailwindcss-alt": "^3.0.0",
|
||||
"vue-custom-element": "^3.3.0",
|
||||
"vue-loader": "^15.11.1",
|
||||
"vue-template-compiler": "^2.6.14"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
<?php
|
||||
|
||||
$redisOptions = [
|
||||
'hostname' => '/run/redis_eptypo3/redis.sock',
|
||||
'port' => 0,
|
||||
];
|
||||
|
||||
if (getenv('IS_DDEV_PROJECT') == 'true') {
|
||||
$redisOptions = [
|
||||
'hostname' => 'redis',
|
||||
'port' => 6379,
|
||||
];
|
||||
|
||||
$GLOBALS['TYPO3_CONF_VARS'] = array_replace_recursive(
|
||||
$GLOBALS['TYPO3_CONF_VARS'],
|
||||
[
|
||||
'DB' => [
|
||||
'Connections' => [
|
||||
'Default' => [
|
||||
'dbname' => 'db',
|
||||
'driver' => 'mysqli',
|
||||
'host' => 'db',
|
||||
'password' => 'db',
|
||||
'port' => '3306',
|
||||
'user' => 'db',
|
||||
],
|
||||
],
|
||||
],
|
||||
// This GFX configuration allows processing by installed ImageMagick 6
|
||||
'GFX' => [
|
||||
'processor' => 'ImageMagick',
|
||||
'processor_path' => '/usr/bin/',
|
||||
'processor_path_lzw' => '/usr/bin/',
|
||||
],
|
||||
// This mail configuration sends all emails to mailpit
|
||||
'MAIL' => [
|
||||
'transport' => 'smtp',
|
||||
'transport_smtp_encrypt' => false,
|
||||
'transport_smtp_server' => 'localhost:1025',
|
||||
],
|
||||
'SYS' => [
|
||||
'trustedHostsPattern' => '.*.*',
|
||||
'devIPmask' => '*',
|
||||
'displayErrors' => 1,
|
||||
],
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
// Fail fast instead of blocking indefinitely when redis is unreachable.
|
||||
$redisOptions['connectionTimeout'] = 2;
|
||||
|
||||
// Note: the cache identifiers must stay unprefixed ('pages', not 'cache_pages'). These
|
||||
// assignments replace the definitions from LocalConfiguration.php wholesale, so 'groups'
|
||||
// and the compression/lifetime options have to be repeated here.
|
||||
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['pages'] = [
|
||||
'frontend' => \TYPO3\CMS\Core\Cache\Frontend\VariableFrontend::class,
|
||||
'backend' => \TYPO3\CMS\Core\Cache\Backend\RedisBackend::class,
|
||||
'options' => $redisOptions + [
|
||||
'database' => 0,
|
||||
'compression' => true,
|
||||
],
|
||||
'groups' => ['pages'],
|
||||
];
|
||||
|
||||
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['hash'] = [
|
||||
'frontend' => \TYPO3\CMS\Core\Cache\Frontend\VariableFrontend::class,
|
||||
'backend' => \TYPO3\CMS\Core\Cache\Backend\RedisBackend::class,
|
||||
'options' => $redisOptions + [
|
||||
'database' => 1,
|
||||
],
|
||||
'groups' => ['pages'],
|
||||
];
|
||||
|
||||
// Own database: RedisBackend::flush() issues FLUSHDB and the keys carry no per-cache
|
||||
// prefix, so two caches sharing a database flush each other.
|
||||
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['rootline'] = [
|
||||
'frontend' => \TYPO3\CMS\Core\Cache\Frontend\VariableFrontend::class,
|
||||
'backend' => \TYPO3\CMS\Core\Cache\Backend\RedisBackend::class,
|
||||
'options' => $redisOptions + [
|
||||
'database' => 2,
|
||||
'compression' => true,
|
||||
'defaultLifetime' => 2592000,
|
||||
],
|
||||
'groups' => ['pages'],
|
||||
];
|
||||
|
||||
// Assets are served through the bunny.net CDN, which gzip/brotli-compresses at the edge.
|
||||
// Pre-gzipped .gzip twins are served with Content-Encoding: gzip and cannot be processed
|
||||
// by the CDN, so stop generating them. mod_deflate still compresses direct origin hits.
|
||||
$GLOBALS['TYPO3_CONF_VARS']['FE']['compressionLevel'] = 0;
|
||||
|
||||
// suppress php deprecation warnings flooding typo3 logs
|
||||
$GLOBALS['TYPO3_CONF_VARS']['SYS']['errorHandlerErrors'] =
|
||||
$GLOBALS['TYPO3_CONF_VARS']['SYS']['errorHandlerErrors'] & ~E_DEPRECATED & ~E_USER_DEPRECATED;
|
||||
/*
|
||||
$GLOBALS['TYPO3_CONF_VARS']['BE']['cookieSameSite'] = 'lax';
|
||||
|
||||
$GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['oauth2_client'] = [
|
||||
'providers' => [
|
||||
'myep' => [
|
||||
'label' => 'MyEP',
|
||||
'iconIdentifier' => 'ep-logo',
|
||||
'scopes' => [
|
||||
\Waldhacker\Oauth2Client\Service\Oauth2ProviderManager::SCOPE_BACKEND,
|
||||
],
|
||||
'options' => [
|
||||
'clientId' => '8df8f314ce17e8b716f86f9c24564746',
|
||||
'clientSecret' => '7ff2532abc06f2b48438fc2e6e0278c8fdfb0e2de839889f4d5d17fd4a37cfffcca3bb19166331cc6ced462550611b33f08e9a3a993270d8c786a884c7fe935b',
|
||||
'urlAuthorize' => 'https://myep-next-booking.ddev.site/authorize',
|
||||
'urlAccessToken' => 'https://myep-next-booking.ddev.site/token',
|
||||
'urlResourceOwnerDetails' => 'https://myep-next-booking.ddev.site/api/userinfo',
|
||||
'scopes' => ['email', 'id', 'roles', 'profile'],
|
||||
'scopeSeparator' => ' ',
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
*/
|
||||
@@ -39,6 +39,7 @@ return [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'sys_language',
|
||||
'foreign_table_where' => 'ORDER BY sys_language.title',
|
||||
@@ -53,6 +54,7 @@ return [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'items' => [
|
||||
['', 0],
|
||||
|
||||
@@ -36,6 +36,7 @@ return [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'sys_language',
|
||||
'foreign_table_where' => 'ORDER BY sys_language.title',
|
||||
@@ -50,6 +51,7 @@ return [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'items' => [
|
||||
['', 0],
|
||||
|
||||
@@ -37,6 +37,7 @@ return [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'sys_language',
|
||||
'foreign_table_where' => 'ORDER BY sys_language.title',
|
||||
@@ -51,6 +52,7 @@ return [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'items' => [
|
||||
['', 0],
|
||||
|
||||
@@ -38,6 +38,7 @@ return [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'sys_language',
|
||||
'foreign_table_where' => 'ORDER BY sys_language.title',
|
||||
@@ -52,6 +53,7 @@ return [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'items' => [
|
||||
['', 0],
|
||||
|
||||
@@ -50,6 +50,7 @@ return [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'sys_language',
|
||||
'foreign_table_where' => 'ORDER BY sys_language.title',
|
||||
@@ -64,6 +65,7 @@ return [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'items' => [
|
||||
['', 0],
|
||||
@@ -449,6 +451,7 @@ return [
|
||||
'label' => 'Ansprechpartner',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'tx_epevents_domain_model_contact',
|
||||
'foreign_table_where' => 'AND 1=1 order by name',
|
||||
@@ -461,6 +464,7 @@ return [
|
||||
'label' => 'Unterkunft',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'tx_epevents_domain_model_hotel',
|
||||
'foreign_table_where' => 'AND 1=1 order by name',
|
||||
@@ -473,6 +477,7 @@ return [
|
||||
'label' => 'Location',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'tx_epevents_domain_model_location',
|
||||
'foreign_table_where' => 'AND 1=1 order by name',
|
||||
|
||||
+2
@@ -35,6 +35,7 @@ return [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'sys_language',
|
||||
'foreign_table_where' => 'ORDER BY sys_language.title',
|
||||
@@ -49,6 +50,7 @@ return [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'items' => [
|
||||
['', 0],
|
||||
|
||||
+4
-2
@@ -38,6 +38,7 @@ return [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'sys_language',
|
||||
'foreign_table_where' => 'ORDER BY sys_language.title',
|
||||
@@ -52,12 +53,13 @@ return [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'items' => [
|
||||
['', 0],
|
||||
],
|
||||
'foreign_table' => 'tx_epevents_domain_model_offer',
|
||||
'foreign_table_where' => 'AND tx_epevents_domain_model_offer.pid=###CURRENT_PID### AND tx_epevents_domain_model_offer.sys_language_uid IN (-1,0)',
|
||||
'foreign_table' => 'tx_epevents_domain_model_traveltype',
|
||||
'foreign_table_where' => 'AND tx_epevents_domain_model_traveltype.pid=###CURRENT_PID### AND tx_epevents_domain_model_traveltype.sys_language_uid IN (-1,0)',
|
||||
],
|
||||
],
|
||||
'l10n_diffsource' => [
|
||||
|
||||
@@ -4,9 +4,6 @@ import Vue from 'vue'
|
||||
import $ from 'jquery'
|
||||
import VueSession from 'vue-session'
|
||||
|
||||
import 'lazysizes';
|
||||
import 'lazysizes/plugins/attrchange/ls.attrchange';
|
||||
|
||||
const slick = require('slick-carousel');
|
||||
const Sticky = require('sticky-js');
|
||||
const $window = $(window);
|
||||
|
||||
+17
-10
@@ -38,9 +38,9 @@
|
||||
<div class="card card--no-form offerlist-item__card">
|
||||
<div class="card__inner">
|
||||
<picture>
|
||||
<source media="(max-width: 512px)" :data-srcset="offer.teaserImageMobile + ' 500w'"/>
|
||||
<img class="card__image scale lazyload" data-sizes="auto"
|
||||
:data-src="offer.teaserImage" alt="">
|
||||
<source media="(max-width: 512px)" :srcset="offer.teaserImageMobile"/>
|
||||
<img class="card__image scale"
|
||||
:src="offer.teaserImage" alt="" loading="lazy">
|
||||
</picture>
|
||||
<div class="card__caption">
|
||||
<span class="card__subtitle" v-html="offer.name"></span>
|
||||
@@ -55,7 +55,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from 'axios';
|
||||
import $ from 'jquery';
|
||||
|
||||
export default {
|
||||
@@ -82,13 +81,21 @@
|
||||
load() {
|
||||
this.loading = true;
|
||||
sessionStorage.setItem('filterSettings', JSON.stringify(this.filterSettings));
|
||||
axios({
|
||||
url: this.endpointUri,
|
||||
method: 'post',
|
||||
data: $.param({'tx_epevents_ajax[filterSettings]': this.filterSettings})
|
||||
fetch(this.endpointUri, {
|
||||
method: 'POST',
|
||||
credentials: 'same-origin',
|
||||
headers: {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'},
|
||||
body: $.param({'tx_epevents_ajax[filterSettings]': this.filterSettings})
|
||||
}).then(response => {
|
||||
this.offers = response.data.offers;
|
||||
this.filterOptions = response.data.filterOptions;
|
||||
// fetch only rejects on network errors, so surface HTTP errors here
|
||||
// to keep the previous behaviour of falling through to .catch()
|
||||
if (!response.ok) {
|
||||
throw new Error(response.statusText);
|
||||
}
|
||||
return response.json();
|
||||
}).then(data => {
|
||||
this.offers = data.offers;
|
||||
this.filterOptions = data.filterOptions;
|
||||
this.loading = false;
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
@use "breakpoints";
|
||||
@use "mixins";
|
||||
|
||||
.badge {
|
||||
display: none;
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
display: block;
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
@@ -27,15 +30,15 @@
|
||||
font-size: 20px;
|
||||
font-weight: 700;
|
||||
line-height: 130%;
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
font-size: 32px;
|
||||
}
|
||||
}
|
||||
|
||||
.badge__outline {
|
||||
@include sectionFills(0.15);
|
||||
@include mixins.sectionFills(0.15);
|
||||
}
|
||||
|
||||
.badge__inner {
|
||||
@include sectionFills();
|
||||
@include mixins.sectionFills();
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
@use "mixins";
|
||||
|
||||
.banner {
|
||||
position: relative;
|
||||
margin-bottom: 20px;
|
||||
@@ -8,7 +10,7 @@
|
||||
min-height: 300px;
|
||||
padding: 48px 0;
|
||||
color: white;
|
||||
@include sectionBackgrounds(0.8);
|
||||
@include mixins.sectionBackgrounds(0.8);
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
|
||||
@@ -1,14 +1,20 @@
|
||||
@use "breakpoints";
|
||||
@use "colors";
|
||||
@use "fonts";
|
||||
@use "mixins";
|
||||
@use "variables";
|
||||
|
||||
html,
|
||||
body {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-family: $font-main, Sans-Serif;
|
||||
font-family: fonts.$font-main, Sans-Serif;
|
||||
font-weight: 400;
|
||||
font-size: 16px;
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
@@ -41,13 +47,13 @@ html {
|
||||
height: auto;
|
||||
margin-left: auto;
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.navtoggle__icon {
|
||||
fill: $color-font-main;
|
||||
fill: colors.$color-font-main;
|
||||
transition: all 0.25s ease-in-out;
|
||||
|
||||
.mobilenav--open & {
|
||||
@@ -62,7 +68,7 @@ html {
|
||||
right: 2%;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
background-color: $color-brand-primary;
|
||||
background-color: colors.$color-brand-primary;
|
||||
opacity: 0.75;
|
||||
}
|
||||
|
||||
@@ -76,12 +82,12 @@ a {
|
||||
&.anchor {
|
||||
display: block;
|
||||
height: 0;
|
||||
padding-top: $header-height-mobile;
|
||||
margin-top: -$header-height-mobile;
|
||||
padding-top: variables.$header-height-mobile;
|
||||
margin-top: -(variables.$header-height-mobile);
|
||||
|
||||
@include mq($from: tablet) {
|
||||
padding-top: $header-height-desktop;
|
||||
margin-top: -$header-height-desktop;
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
padding-top: variables.$header-height-desktop;
|
||||
margin-top: -(variables.$header-height-desktop);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -126,7 +132,7 @@ ul {
|
||||
left: 0;
|
||||
content: "\25CF";
|
||||
font-size: 18px;
|
||||
@include sectionColoursFromParent();
|
||||
@include mixins.sectionColoursFromParent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -144,8 +150,8 @@ p {
|
||||
hr {
|
||||
max-width: 25%;
|
||||
margin: 32px auto 32px 0;
|
||||
color: $color-ruler;
|
||||
background-color: $color-ruler;
|
||||
color: colors.$color-ruler;
|
||||
background-color: colors.$color-ruler;
|
||||
height: 1px;
|
||||
border: none;
|
||||
}
|
||||
@@ -161,7 +167,7 @@ h3,
|
||||
}
|
||||
|
||||
.headline {
|
||||
@include sectionColoursFromParent();
|
||||
@include mixins.sectionColoursFromParent();
|
||||
|
||||
&--icon {
|
||||
display: flex;
|
||||
@@ -186,7 +192,7 @@ h1,
|
||||
text-transform: uppercase;
|
||||
padding-bottom: 18px;
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
font-size: 32px;
|
||||
padding-bottom: 24px;
|
||||
}
|
||||
@@ -200,11 +206,11 @@ h1,
|
||||
display: block;
|
||||
font-size: 16px;
|
||||
line-height: 120%;
|
||||
color: $color-brand-primary;
|
||||
color: colors.$color-brand-primary;
|
||||
text-transform: none;
|
||||
@include sectionColoursFromParent();
|
||||
@include mixins.sectionColoursFromParent();
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
@@ -221,7 +227,7 @@ h2,
|
||||
padding-bottom: 16px;
|
||||
font-weight: 400;
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
font-size: 24px;
|
||||
padding-bottom: 24px;
|
||||
}
|
||||
@@ -231,7 +237,7 @@ h3 {
|
||||
font-weight: 400;
|
||||
font-size: 16px;
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
font-size: 18px;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
@@ -243,7 +249,7 @@ h3 {
|
||||
height: auto;
|
||||
padding-right: 16px;
|
||||
|
||||
@include mq($from: mobile) {
|
||||
@include breakpoints.mq($from: mobile) {
|
||||
width: 96px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
@use "breakpoints";
|
||||
@use "colors";
|
||||
|
||||
.box {
|
||||
width: 100%;
|
||||
}
|
||||
@@ -13,7 +16,7 @@
|
||||
color: white;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
background-color: $color-brand-secondary;
|
||||
background-color: colors.$color-brand-secondary;
|
||||
border: none;
|
||||
width: 100%;
|
||||
font-size: 20px;
|
||||
@@ -23,18 +26,18 @@
|
||||
|
||||
.box__content {
|
||||
padding: 32px 16px;
|
||||
background-color: $color-brand-primary;
|
||||
background-color: colors.$color-brand-primary;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.box__form {
|
||||
display: none;
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
fill: $color-brand-primary;
|
||||
fill: colors.$color-brand-primary;
|
||||
}
|
||||
|
||||
&--top {
|
||||
@@ -52,7 +55,7 @@
|
||||
font-size: 16px;
|
||||
line-height: 32px;
|
||||
|
||||
@include mq($from: desktop) {
|
||||
@include breakpoints.mq($from: desktop) {
|
||||
font-size: 20px;
|
||||
line-height: 32px;
|
||||
|
||||
@@ -66,7 +69,7 @@
|
||||
.box__nav {
|
||||
margin-top: -32px;
|
||||
padding-bottom: 32px;
|
||||
background-color: $color-brand-primary;
|
||||
background-color: colors.$color-brand-primary;
|
||||
}
|
||||
|
||||
.box__nav__item {
|
||||
@@ -78,7 +81,7 @@
|
||||
|
||||
&--active,
|
||||
&:hover {
|
||||
background-color: $color-brand-light;
|
||||
background-color: colors.$color-brand-light;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
@use "breakpoints";
|
||||
@use "colors";
|
||||
|
||||
.brands {
|
||||
padding-top: 32px;
|
||||
border-top: 1px solid $color-divider;
|
||||
border-top: 1px solid colors.$color-divider;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
@@ -9,7 +12,7 @@
|
||||
.brands__item {
|
||||
width: 50%;
|
||||
|
||||
@include mq($from: desktop) {
|
||||
@include breakpoints.mq($from: desktop) {
|
||||
width: 25%;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
$mq-breakpoints: (
|
||||
mobile: $viewport-width-mobile,
|
||||
tablet: $viewport-width-tablet,
|
||||
desktop: $viewport-width-desktop
|
||||
);
|
||||
@use "variables";
|
||||
|
||||
@import "~sass-mq";
|
||||
@forward "sass-mq" with (
|
||||
$breakpoints: (
|
||||
mobile: variables.$viewport-width-mobile,
|
||||
tablet: variables.$viewport-width-tablet,
|
||||
desktop: variables.$viewport-width-desktop
|
||||
)
|
||||
);
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
@use "breakpoints";
|
||||
@use "colors";
|
||||
@use "mixins";
|
||||
|
||||
.button {
|
||||
display: inline-block;
|
||||
font-weight: 700;
|
||||
@@ -5,7 +9,7 @@
|
||||
|
||||
&--default {
|
||||
display: inline-block;
|
||||
background-color: $color-brand-primary;
|
||||
background-color: colors.$color-brand-primary;
|
||||
color: white;
|
||||
padding: 4px 16px;
|
||||
}
|
||||
@@ -13,7 +17,7 @@
|
||||
&--page-header {
|
||||
display: block;
|
||||
min-width: 186px;
|
||||
background-color: $color-brand-primary;
|
||||
background-color: colors.$color-brand-primary;
|
||||
color: white;
|
||||
font-size: 18px;
|
||||
padding: 0 32px 0 24px;
|
||||
@@ -26,14 +30,14 @@
|
||||
display: block;
|
||||
min-width: 220px;
|
||||
text-align: center;
|
||||
background-color: $color-brand-primary;
|
||||
@include sectionBackgroundsFromParent();
|
||||
background-color: colors.$color-brand-primary;
|
||||
@include mixins.sectionBackgroundsFromParent();
|
||||
color: white;
|
||||
line-height: 48px;
|
||||
border: none;
|
||||
outline: none;
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
box-shadow: 8px 8px 8px rgba(black, 0.2);
|
||||
font-size: 24px;
|
||||
}
|
||||
@@ -43,7 +47,7 @@
|
||||
width: 100%;
|
||||
display: inline-block;
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
@@ -56,7 +60,7 @@
|
||||
|
||||
&:hover {
|
||||
background: white;
|
||||
color: $color-font-main;
|
||||
color: colors.$color-font-main;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,7 +69,7 @@
|
||||
}
|
||||
|
||||
&--icon {
|
||||
background-color: $color-brand-primary;
|
||||
background-color: colors.$color-brand-primary;
|
||||
color: white;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
@use "breakpoints";
|
||||
@use "mixins";
|
||||
|
||||
.card {
|
||||
@include mq($from: desktop) {
|
||||
@include breakpoints.mq($from: desktop) {
|
||||
&:not(.card--no-form) {
|
||||
padding-bottom: 48px;
|
||||
}
|
||||
@@ -20,12 +23,12 @@
|
||||
padding: 16px;
|
||||
color: white;
|
||||
text-transform: uppercase;
|
||||
@include sectionBackgrounds(0.75);
|
||||
@include mixins.sectionBackgrounds(0.75);
|
||||
transition: background-color 0.25s ease-in-out;
|
||||
|
||||
@include mq($from: desktop) {
|
||||
@include breakpoints.mq($from: desktop) {
|
||||
.card:hover & {
|
||||
@include sectionBackgrounds();
|
||||
@include mixins.sectionBackgrounds();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -33,7 +36,7 @@
|
||||
.card__form {
|
||||
display: none;
|
||||
|
||||
@include mq($from: desktop) {
|
||||
@include breakpoints.mq($from: desktop) {
|
||||
display: block;
|
||||
opacity: 0;
|
||||
transition: opacity 0.25s ease-in-out;
|
||||
@@ -50,7 +53,7 @@
|
||||
}
|
||||
|
||||
polygon {
|
||||
@include sectionFills();
|
||||
@include mixins.sectionFills();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,21 +1,25 @@
|
||||
@use "colors";
|
||||
@use "mixins";
|
||||
@use "variables";
|
||||
|
||||
.carousel {
|
||||
|
||||
&--background {
|
||||
background-color: $color-background;
|
||||
background-color: colors.$color-background;
|
||||
padding-bottom: 48px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
@include sectionBackgrounds(0.25);
|
||||
@include mixins.sectionBackgrounds(0.25);
|
||||
}
|
||||
|
||||
.carousel__outer {
|
||||
@include container($viewport-width-max);
|
||||
@include mixins.container(variables.$viewport-width-max);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.carousel__inner {
|
||||
@include container($content-width-max);
|
||||
@include mixins.container(variables.$content-width-max);
|
||||
}
|
||||
|
||||
.carousel__item {
|
||||
@@ -36,7 +40,7 @@
|
||||
height: 32px;
|
||||
|
||||
fill: white;
|
||||
@include sectionColoursFromParent;
|
||||
@include mixins.sectionColoursFromParent;
|
||||
|
||||
&--prev {
|
||||
left: -5px;
|
||||
@@ -59,7 +63,7 @@
|
||||
}
|
||||
|
||||
.testimonials & {
|
||||
fill: $color-brand-primary;
|
||||
fill: colors.$color-brand-primary;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
@use "sass:color";
|
||||
|
||||
//$color-brand-primary: #0084d4;
|
||||
$color-brand-primary: #19a0d2;
|
||||
$color-brand-secondary: #1e314b;
|
||||
$color-brand-light: #8CCFE8;
|
||||
$color-background: lighten(#dbdee2, 5%);
|
||||
$color-background: color.adjust(#dbdee2, $lightness: 5%);
|
||||
|
||||
$color-font-main: #1e314b;
|
||||
$color-divider: rgba($color-background, 0.8);
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
@use "breakpoints";
|
||||
@use "colors";
|
||||
|
||||
.configurator {
|
||||
background: url(../images/bg_configurator.jpg) no-repeat top left;
|
||||
background-size: cover;
|
||||
@@ -39,7 +42,7 @@
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: rgba($color-brand-secondary, 0.85);
|
||||
background-color: rgba(colors.$color-brand-secondary, 0.85);
|
||||
color: white;
|
||||
}
|
||||
|
||||
@@ -51,7 +54,7 @@
|
||||
display: none;
|
||||
color: white;
|
||||
|
||||
@include mq($from: desktop) {
|
||||
@include breakpoints.mq($from: desktop) {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
@@ -83,11 +86,11 @@
|
||||
text-decoration: none;
|
||||
text-transform: uppercase;
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
|
||||
@include mq($from: desktop) {
|
||||
@include breakpoints.mq($from: desktop) {
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
@@ -98,12 +101,12 @@
|
||||
margin-bottom: 8px;
|
||||
font-weight: 700;
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
width: 30%;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
@include mq($from: desktop) {
|
||||
@include breakpoints.mq($from: desktop) {
|
||||
width: 20%;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
@@ -113,11 +116,11 @@
|
||||
width: 100%;
|
||||
padding-right: 40px;
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
@include mq($from: desktop) {
|
||||
@include breakpoints.mq($from: desktop) {
|
||||
width: 80%;
|
||||
}
|
||||
}
|
||||
@@ -131,11 +134,11 @@
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
@include mq($from: desktop) {
|
||||
@include breakpoints.mq($from: desktop) {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
@@ -151,13 +154,13 @@
|
||||
text-decoration: none;
|
||||
text-align: center;
|
||||
color: white;
|
||||
background-color: $color-brand-primary;
|
||||
background-color: colors.$color-brand-primary;
|
||||
border-radius: 16px;
|
||||
font-family: "fontello";
|
||||
|
||||
&.closed {
|
||||
background-color: white;
|
||||
color: $color-brand-primary;
|
||||
color: colors.$color-brand-primary;
|
||||
|
||||
&:before {
|
||||
content: '\e800';
|
||||
@@ -204,7 +207,7 @@
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
@include mq($from: mobile) {
|
||||
@include breakpoints.mq($from: mobile) {
|
||||
width: 50%;
|
||||
|
||||
.active & {
|
||||
@@ -212,7 +215,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@include mq($from: desktop) {
|
||||
@include breakpoints.mq($from: desktop) {
|
||||
width: 25%;
|
||||
|
||||
.active & {
|
||||
@@ -240,10 +243,10 @@
|
||||
}
|
||||
|
||||
.selected &:after {
|
||||
background-color: rgba($color-brand-secondary, 0.75);
|
||||
background-color: rgba(colors.$color-brand-secondary, 0.75);
|
||||
}
|
||||
|
||||
@include mq($from: desktop) {
|
||||
@include breakpoints.mq($from: desktop) {
|
||||
&:hover:after {
|
||||
content: "";
|
||||
width: 100%;
|
||||
@@ -251,7 +254,7 @@
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-color: rgba($color-brand-primary, 0.5);
|
||||
background-color: rgba(colors.$color-brand-primary, 0.5);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -260,12 +263,12 @@
|
||||
background-position: center 32px;
|
||||
background-size: 96px;
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
background-position: center 16px;
|
||||
background-size: 128px;
|
||||
}
|
||||
|
||||
@include mq($from: desktop) {
|
||||
@include breakpoints.mq($from: desktop) {
|
||||
background-position: center 8px;
|
||||
background-size: 96px;
|
||||
}
|
||||
@@ -382,7 +385,7 @@
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
}
|
||||
@@ -391,7 +394,7 @@
|
||||
width: 100%;
|
||||
padding-bottom: 16px;
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
width: 66.6666%;
|
||||
padding-right: 32px;
|
||||
}
|
||||
@@ -401,7 +404,7 @@
|
||||
width: 100%;
|
||||
padding-bottom: 16px;
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
width: 33.3333%;
|
||||
}
|
||||
}
|
||||
@@ -456,7 +459,7 @@
|
||||
line-height: 32px;
|
||||
text-align: center;
|
||||
background-color: white;
|
||||
color: $color-brand-primary;
|
||||
color: colors.$color-brand-primary;
|
||||
border-radius: 16px;
|
||||
font-family: 'fontello';
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// .headline* live in _base.scss; @extend needs that module loaded explicitly.
|
||||
@use "base";
|
||||
|
||||
.cookiefirst {
|
||||
h2 {
|
||||
@extend .headline;
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
@use "breakpoints";
|
||||
@use "colors";
|
||||
@use "mixins";
|
||||
|
||||
.form {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
position: relative;
|
||||
max-width: 100%;
|
||||
|
||||
@include mq($from: desktop) {
|
||||
@include breakpoints.mq($from: desktop) {
|
||||
&:not(&--horizontal) {
|
||||
max-width: 75%;
|
||||
}
|
||||
@@ -16,7 +20,7 @@
|
||||
|
||||
&--horizontal {
|
||||
width: 100%;
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
@@ -42,7 +46,7 @@
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
background-color: $color-brand-light;
|
||||
background-color: colors.$color-brand-light;
|
||||
color: white;
|
||||
border-radius: 8px;
|
||||
}
|
||||
@@ -50,7 +54,7 @@
|
||||
&--mobile {
|
||||
display: block;
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@@ -58,7 +62,7 @@
|
||||
&--tablet {
|
||||
display: none;
|
||||
|
||||
@include mq($from: tablet, $until: desktop) {
|
||||
@include breakpoints.mq($from: tablet, $until: desktop) {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
@@ -66,7 +70,7 @@
|
||||
&--desktop {
|
||||
display: none;
|
||||
|
||||
@include mq($from: desktop) {
|
||||
@include breakpoints.mq($from: desktop) {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
@@ -79,7 +83,7 @@
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
width: 33.3333%;
|
||||
}
|
||||
}
|
||||
@@ -88,20 +92,20 @@
|
||||
.form__item__error {
|
||||
padding: 8px;
|
||||
font-size: 90%;
|
||||
color: $color-formerror;
|
||||
color: colors.$color-formerror;
|
||||
}
|
||||
|
||||
.form__field {
|
||||
@include nooutline;
|
||||
@include mixins.nooutline;
|
||||
border: none;
|
||||
border-radius: 8px;
|
||||
width: 100%;
|
||||
padding: 8px 16px;
|
||||
color: white;
|
||||
background-color: $color-brand-light;
|
||||
background-color: colors.$color-brand-light;
|
||||
|
||||
.form--box & {
|
||||
background-color: $color-brand-light;
|
||||
background-color: colors.$color-brand-light;
|
||||
color: white;
|
||||
}
|
||||
|
||||
@@ -114,10 +118,10 @@
|
||||
display: block;
|
||||
padding: 8px;
|
||||
width: 100%;
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
width: 50%;
|
||||
}
|
||||
@include mq($from: desktop) {
|
||||
@include breakpoints.mq($from: desktop) {
|
||||
width: 25%;
|
||||
}
|
||||
}
|
||||
@@ -127,7 +131,7 @@
|
||||
}
|
||||
|
||||
.has-errors & {
|
||||
border: 1px solid $color-formerror;
|
||||
border: 1px solid colors.$color-formerror;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,7 +162,7 @@
|
||||
display: block;
|
||||
width: 100%;
|
||||
color: white;
|
||||
background-color: $color-brand-secondary;
|
||||
background-color: colors.$color-brand-secondary;
|
||||
border: none;
|
||||
font-weight: 700;
|
||||
text-decoration: none;
|
||||
@@ -166,7 +170,7 @@
|
||||
padding: 8px 32px;
|
||||
margin-bottom: 16px;
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
display: inline-block;
|
||||
width: auto;
|
||||
margin-bottom: 0;
|
||||
@@ -189,10 +193,10 @@
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: rgba($color-divider, 0.75);
|
||||
background-color: rgba(colors.$color-divider, 0.75);
|
||||
|
||||
.form--box & {
|
||||
background-color: rgba($color-brand-primary, 0.75);
|
||||
background-color: rgba(colors.$color-brand-primary, 0.75);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
@use "breakpoints";
|
||||
@use "colors";
|
||||
|
||||
.helpernav {
|
||||
display: none;
|
||||
|
||||
@include mq($from: mobile) {
|
||||
@include breakpoints.mq($from: mobile) {
|
||||
display: block;
|
||||
position: relative;
|
||||
}
|
||||
@@ -24,7 +27,7 @@
|
||||
z-index: 10;
|
||||
min-width: 300px;
|
||||
padding: 16px 32px;
|
||||
background-color: $color-brand-primary;
|
||||
background-color: colors.$color-brand-primary;
|
||||
}
|
||||
|
||||
.helpernav__item {
|
||||
@@ -32,7 +35,7 @@
|
||||
&:hover:not(.helpernav__item--disabled) {
|
||||
|
||||
& > .helpernav__link {
|
||||
background-color: $color-brand-primary;
|
||||
background-color: colors.$color-brand-primary;
|
||||
}
|
||||
|
||||
& > .helpernav__subnav {
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
@use "breakpoints";
|
||||
@use "colors";
|
||||
@use "mixins";
|
||||
@use "variables";
|
||||
|
||||
.herounit {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
max-width: $viewport-width-max;
|
||||
max-width: variables.$viewport-width-max;
|
||||
margin: 0 auto;
|
||||
|
||||
&--indent {
|
||||
max-width: $content-width-max - 16px;
|
||||
max-width: variables.$content-width-max - 16px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,22 +21,22 @@
|
||||
|
||||
height: 240px;
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
height: 384px;
|
||||
}
|
||||
|
||||
@include mq($from: desktop) {
|
||||
@include breakpoints.mq($from: desktop) {
|
||||
height: 420px;
|
||||
}
|
||||
|
||||
.herounit--large & {
|
||||
height: 300px;
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
height: 480px;
|
||||
}
|
||||
|
||||
@include mq($from: desktop) {
|
||||
@include breakpoints.mq($from: desktop) {
|
||||
height: 700px;
|
||||
}
|
||||
}
|
||||
@@ -39,7 +44,7 @@
|
||||
.herounit--indent & {
|
||||
height: 320px;
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
height: 480px;
|
||||
}
|
||||
}
|
||||
@@ -48,7 +53,7 @@
|
||||
.herounit__mask {
|
||||
display: none;
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
top: 0;
|
||||
@@ -67,9 +72,9 @@
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 32px;
|
||||
background-color: rgba($color-brand-secondary, 0.2);
|
||||
background-color: rgba(colors.$color-brand-secondary, 0.2);
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
background-color: transparent;
|
||||
padding: 64px 16px 0 96px;
|
||||
max-width: 45%;
|
||||
@@ -83,7 +88,7 @@
|
||||
font-size: 32px;
|
||||
line-height: 95%;
|
||||
|
||||
@include mq($from: desktop) {
|
||||
@include breakpoints.mq($from: desktop) {
|
||||
font-size: 48px;
|
||||
}
|
||||
|
||||
@@ -101,10 +106,10 @@
|
||||
span {
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
color: $color-brand-primary;
|
||||
color: colors.$color-brand-primary;
|
||||
}
|
||||
|
||||
@include mq($from: desktop) {
|
||||
@include breakpoints.mq($from: desktop) {
|
||||
font-size: 56px;
|
||||
}
|
||||
}
|
||||
@@ -120,7 +125,7 @@
|
||||
color: white;
|
||||
text-transform: none;
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
@@ -128,12 +133,12 @@
|
||||
font-size: 22px;
|
||||
font-weight: 700;
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
font-size: 24px;
|
||||
padding-bottom: 48px;
|
||||
}
|
||||
|
||||
@include mq($from: desktop) {
|
||||
@include breakpoints.mq($from: desktop) {
|
||||
font-size: 32px;
|
||||
padding-bottom: 96px;
|
||||
}
|
||||
@@ -146,7 +151,7 @@
|
||||
line-height: 120%;
|
||||
color: white;
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
@@ -154,7 +159,7 @@
|
||||
.herounit__icon {
|
||||
display: none;
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
@@ -173,11 +178,11 @@
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
top: 85%;
|
||||
}
|
||||
|
||||
@include mq($from: desktop) {
|
||||
@include breakpoints.mq($from: desktop) {
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
@@ -190,34 +195,34 @@
|
||||
height: 48px;
|
||||
border: none;
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
display: block;
|
||||
}
|
||||
|
||||
& > polygon {
|
||||
fill: $color-brand-primary;
|
||||
@include sectionFills();
|
||||
fill: colors.$color-brand-primary;
|
||||
@include mixins.sectionFills();
|
||||
}
|
||||
}
|
||||
|
||||
#gradient__from {
|
||||
stop-color: $color-brand-secondary;
|
||||
stop-color: colors.$color-brand-secondary;
|
||||
}
|
||||
|
||||
#gradient__to {
|
||||
.section-default & {
|
||||
stop-color: $color-brand-primary;
|
||||
stop-color: colors.$color-brand-primary;
|
||||
}
|
||||
.section-incentives & {
|
||||
stop-color: $color-incentives;
|
||||
stop-color: colors.$color-incentives;
|
||||
}
|
||||
.section-teambuilding & {
|
||||
stop-color: $color-teambuilding;
|
||||
stop-color: colors.$color-teambuilding;
|
||||
}
|
||||
.secolor-meeting & {
|
||||
stop-color: $color-meetings;
|
||||
stop-color: colors.$color-meetings;
|
||||
}
|
||||
.secolor-events & {
|
||||
stop-color: $color-events;
|
||||
stop-color: colors.$color-events;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
@use "breakpoints";
|
||||
@use "colors";
|
||||
|
||||
.iconbar {
|
||||
@apply hidden lg:block fixed z-100 top-[30vh] right-0 overflow-hidden;
|
||||
}
|
||||
.iconbar {
|
||||
display: none;
|
||||
@include mq($from: desktop) {
|
||||
@include breakpoints.mq($from: desktop) {
|
||||
display: block;
|
||||
}
|
||||
position: fixed;
|
||||
@@ -20,7 +23,7 @@
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
background-color: $color-brand-light;
|
||||
background-color: colors.$color-brand-light;
|
||||
margin-bottom: 2px;
|
||||
|
||||
&:hover {
|
||||
@@ -30,7 +33,7 @@
|
||||
|
||||
.iconbar__icon {
|
||||
padding: 4px;
|
||||
background-color: $color-brand-primary;
|
||||
background-color: colors.$color-brand-primary;
|
||||
|
||||
svg {
|
||||
display: block;
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
@use "breakpoints";
|
||||
@use "mixins";
|
||||
|
||||
.iconnav {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
@@ -21,7 +24,7 @@
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
@include mq($from: mobile) {
|
||||
@include breakpoints.mq($from: mobile) {
|
||||
width: 25%;
|
||||
}
|
||||
}
|
||||
@@ -36,5 +39,5 @@
|
||||
.iconnav__label {
|
||||
text-transform: uppercase;
|
||||
font-weight: 700;
|
||||
@include sectionColours();
|
||||
@include mixins.sectionColours();
|
||||
}
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
@use "breakpoints";
|
||||
@use "mixins";
|
||||
|
||||
main {
|
||||
padding-top: 96px;
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
padding-top: 140px;
|
||||
}
|
||||
}
|
||||
@@ -10,7 +13,7 @@ main {
|
||||
width: 100%;
|
||||
padding-top: 32px;
|
||||
padding-bottom: 32px;
|
||||
@include clearfix();
|
||||
@include mixins.clearfix();
|
||||
|
||||
&.nopad {
|
||||
&--bottom {
|
||||
@@ -23,18 +26,18 @@ main {
|
||||
}
|
||||
|
||||
.content__title {
|
||||
@include container();
|
||||
@include mixins.container();
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.content__inner {
|
||||
@include container();
|
||||
@include mixins.container();
|
||||
|
||||
.content--has-sidebar & {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
}
|
||||
@@ -45,40 +48,40 @@ main {
|
||||
padding: 0 0 32px;
|
||||
overflow: hidden;
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.content__plain {
|
||||
@include clearfix();
|
||||
@include mq($from: tablet) {
|
||||
@include mixins.clearfix();
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
padding-right: 96px;
|
||||
}
|
||||
}
|
||||
|
||||
.content__background {
|
||||
@include clearfix();
|
||||
@include sectionBackgrounds(0.15);
|
||||
@include mixins.clearfix();
|
||||
@include mixins.sectionBackgrounds(0.15);
|
||||
padding: 24px 48px 24px 32px;
|
||||
}
|
||||
|
||||
.content__float {
|
||||
@include clearfix();
|
||||
@include mixins.clearfix();
|
||||
}
|
||||
|
||||
.content__sidebar {
|
||||
width: 100%;
|
||||
padding: 32px 0;
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
flex: 0 0 320px;
|
||||
padding: 0 0 0 32px;
|
||||
}
|
||||
}
|
||||
|
||||
.content__form {
|
||||
@include sectionFills(0.15);
|
||||
@include mixins.sectionFills(0.15);
|
||||
width: 100%;
|
||||
height: auto;
|
||||
display: block;
|
||||
@@ -93,7 +96,7 @@ main {
|
||||
|
||||
.desktop-only {
|
||||
display: none;
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
@use "sass:math";
|
||||
@use "variables" as *;
|
||||
@use "colors" as *;
|
||||
|
||||
@mixin clearfix {
|
||||
&::after {
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
@use "breakpoints";
|
||||
@use "colors";
|
||||
|
||||
.mobilenav {
|
||||
position: fixed;
|
||||
z-index: 50;
|
||||
@@ -7,10 +10,10 @@
|
||||
height: 0;
|
||||
padding-top: 96px;
|
||||
overflow: hidden;
|
||||
background: rgba($color-brand-secondary, 0.9);
|
||||
background: rgba(colors.$color-brand-secondary, 0.9);
|
||||
transition: height 0.25s ease-in-out;
|
||||
|
||||
@include mq($from: desktop) {
|
||||
@include breakpoints.mq($from: desktop) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
@use "breakpoints";
|
||||
|
||||
.news-entry {
|
||||
width: 100%;
|
||||
&:not(:last-child) {
|
||||
@@ -13,7 +15,7 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
@include mq($from: desktop) {
|
||||
@include breakpoints.mq($from: desktop) {
|
||||
flex-direction: row;
|
||||
}
|
||||
}
|
||||
@@ -22,7 +24,7 @@
|
||||
width: 100%;
|
||||
margin-bottom: 8px;
|
||||
|
||||
@include mq($from: desktop) {
|
||||
@include breakpoints.mq($from: desktop) {
|
||||
width: 50%;
|
||||
}
|
||||
}
|
||||
@@ -39,7 +41,7 @@
|
||||
.news-entry__teaser {
|
||||
width: 100%;
|
||||
|
||||
@include mq($from: desktop) {
|
||||
@include breakpoints.mq($from: desktop) {
|
||||
padding-left: 24px;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
@use "breakpoints";
|
||||
|
||||
.offerlist {
|
||||
position: relative;
|
||||
}
|
||||
@@ -13,7 +15,7 @@
|
||||
}
|
||||
|
||||
.offerlist__teasers {
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
@@ -24,13 +26,13 @@
|
||||
text-decoration: none;
|
||||
margin-bottom: 32px;
|
||||
display: block;
|
||||
@include mq($from: mobile) {
|
||||
@include breakpoints.mq($from: mobile) {
|
||||
display: flex;
|
||||
}
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
width: 50%;
|
||||
}
|
||||
@include mq($from: desktop) {
|
||||
@include breakpoints.mq($from: desktop) {
|
||||
width: 33.3333%;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,25 +1,30 @@
|
||||
@use "breakpoints";
|
||||
@use "colors";
|
||||
@use "mixins";
|
||||
@use "variables";
|
||||
|
||||
.page-footer {
|
||||
width: 100%;
|
||||
background: linear-gradient(to right, $color-brand-secondary, $color-brand-primary);
|
||||
background: linear-gradient(to right, colors.$color-brand-secondary, colors.$color-brand-primary);
|
||||
color: white;
|
||||
padding-top: 16px;
|
||||
padding-bottom: 16px;
|
||||
|
||||
@include mq($from: mobile) {
|
||||
@include breakpoints.mq($from: mobile) {
|
||||
padding-top: 48px;
|
||||
padding-bottom: 48px;
|
||||
}
|
||||
}
|
||||
|
||||
.page-footer__inner {
|
||||
@include container($content-width-max);
|
||||
@include mixins.container(variables.$content-width-max);
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
border-bottom: 1px solid white;
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
padding-bottom: 48px;
|
||||
}
|
||||
}
|
||||
@@ -33,14 +38,14 @@
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
&--hide-mobile {
|
||||
display: none;
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
@@ -60,14 +65,14 @@
|
||||
}
|
||||
|
||||
.page-footer__bottom {
|
||||
@include container($content-width-max);
|
||||
@include mixins.container(variables.$content-width-max);
|
||||
padding-top: 32px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-around;
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
}
|
||||
@@ -76,7 +81,7 @@
|
||||
.page-footer__bottom__column {
|
||||
width: 100%;
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
width: 33.3333%;
|
||||
}
|
||||
}
|
||||
@@ -86,7 +91,7 @@
|
||||
justify-content: center;
|
||||
align-items: flex-start;
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
justify-content: flex-start;
|
||||
}
|
||||
}
|
||||
@@ -106,7 +111,7 @@
|
||||
font-weight: 700;
|
||||
text-align: center;
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
@@ -115,7 +120,7 @@
|
||||
text-align: center;
|
||||
padding-top: 32px;
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
text-align: right;
|
||||
padding-top: 0;
|
||||
}
|
||||
@@ -138,7 +143,7 @@
|
||||
text-align: center;
|
||||
padding-top: 32px;
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
text-align: left;
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
@use "breakpoints";
|
||||
@use "colors";
|
||||
@use "mixins";
|
||||
|
||||
.page-header {
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
@@ -5,28 +9,28 @@
|
||||
left: 0;
|
||||
z-index: 1000;
|
||||
background: white;
|
||||
box-shadow: 0 2px 2px rgba($color-background, 0.5);
|
||||
box-shadow: 0 2px 2px rgba(colors.$color-background, 0.5);
|
||||
}
|
||||
|
||||
.page-header__bar {
|
||||
background: linear-gradient(to right, $color-brand-primary 50%, $color-brand-secondary);
|
||||
background: linear-gradient(to right, colors.$color-brand-primary 50%, colors.$color-brand-secondary);
|
||||
}
|
||||
|
||||
.page-header__bar__main {
|
||||
@include container();
|
||||
@include mixins.container();
|
||||
color: white;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
justify-content: space-between;
|
||||
}
|
||||
}
|
||||
|
||||
.page-header__bar__search {
|
||||
display: none;
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
display: block;
|
||||
width: 50%;
|
||||
}
|
||||
@@ -37,7 +41,7 @@
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
width: 50%;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
@@ -53,14 +57,14 @@
|
||||
.page-header__bar__divider {
|
||||
display: none;
|
||||
|
||||
@include mq($from: mobile) {
|
||||
@include breakpoints.mq($from: mobile) {
|
||||
display: inline-block;
|
||||
padding: 12px 8px;
|
||||
}
|
||||
}
|
||||
|
||||
.page-header__main {
|
||||
@include container();
|
||||
@include mixins.container();
|
||||
padding: 16px;
|
||||
display: flex;
|
||||
display: -ms-flexbox;
|
||||
@@ -68,11 +72,11 @@
|
||||
align-items: center;
|
||||
-ms-flex-align: center;
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
padding: 32px 16px 24px;
|
||||
}
|
||||
|
||||
@include mq($from: desktop) {
|
||||
@include breakpoints.mq($from: desktop) {
|
||||
justify-content: space-between;
|
||||
align-items: baseline;
|
||||
-ms-flex-align: end;
|
||||
@@ -98,7 +102,7 @@
|
||||
.page-header__sitenav {
|
||||
display: none;
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
@@ -106,7 +110,7 @@
|
||||
.page-header__button {
|
||||
display: none;
|
||||
|
||||
@include mq($from: desktop) {
|
||||
@include breakpoints.mq($from: desktop) {
|
||||
position: relative;
|
||||
display: block;
|
||||
min-width: 220px;
|
||||
@@ -128,6 +132,6 @@
|
||||
border: none;
|
||||
|
||||
& > polygon {
|
||||
fill: $color-brand-primary;
|
||||
fill: colors.$color-brand-primary;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
@use "colors";
|
||||
|
||||
.paginator {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
@@ -10,7 +12,7 @@
|
||||
|
||||
.paginator__item {
|
||||
display: inline-block;
|
||||
background-color: $color-brand-primary;
|
||||
background-color: colors.$color-brand-primary;
|
||||
color: white;
|
||||
padding: 4px;
|
||||
text-decoration: none;
|
||||
@@ -19,8 +21,8 @@
|
||||
}
|
||||
|
||||
&--current {
|
||||
border: 1px solid $color-brand-primary;
|
||||
border: 1px solid colors.$color-brand-primary;
|
||||
background-color: white;
|
||||
color: $color-brand-primary;
|
||||
color: colors.$color-brand-primary;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,24 +1,27 @@
|
||||
@use "breakpoints";
|
||||
@use "mixins";
|
||||
|
||||
.searchresult {}
|
||||
|
||||
.searchresult__info {
|
||||
@include container();
|
||||
@include mixins.container();
|
||||
}
|
||||
|
||||
.searchresult-item {
|
||||
text-decoration: none;
|
||||
margin-bottom: 32px;
|
||||
display: block;
|
||||
@include mq($from: mobile) {
|
||||
@include breakpoints.mq($from: mobile) {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
|
||||
.searchresult-item__card {
|
||||
width: 100%;
|
||||
@include mq($from: mobile) {
|
||||
@include breakpoints.mq($from: mobile) {
|
||||
width: 240px;
|
||||
}
|
||||
@include mq($from: desktop) {
|
||||
@include breakpoints.mq($from: desktop) {
|
||||
width: 33.3333%;
|
||||
}
|
||||
}
|
||||
@@ -27,8 +30,8 @@
|
||||
margin: 0 8px;
|
||||
padding: 32px;
|
||||
color: white;
|
||||
@include sectionBackgrounds();
|
||||
@include mq($from: mobile) {
|
||||
@include mixins.sectionBackgrounds();
|
||||
@include breakpoints.mq($from: mobile) {
|
||||
margin: 0;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
@use "breakpoints";
|
||||
@use "mixins";
|
||||
|
||||
.sitenav {
|
||||
@include mq($from: desktop) {
|
||||
@include breakpoints.mq($from: desktop) {
|
||||
padding-right: 64px;
|
||||
}
|
||||
}
|
||||
@@ -25,7 +28,7 @@
|
||||
&--active,
|
||||
&:hover {
|
||||
border-bottom: 3px solid;
|
||||
@include sectionColours();
|
||||
@include mixins.sectionColours();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
@use "breakpoints";
|
||||
|
||||
.slider {}
|
||||
|
||||
.slider__arrow {
|
||||
@@ -38,7 +40,7 @@
|
||||
top: 30%;
|
||||
}
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
@use "breakpoints";
|
||||
@use "mixins";
|
||||
|
||||
.statement {
|
||||
@include container();
|
||||
@include mixins.container();
|
||||
padding-top: 32px;
|
||||
padding-bottom: 48px;
|
||||
}
|
||||
|
||||
.statement__inner {
|
||||
@include sectionBackgrounds();
|
||||
@include mixins.sectionBackgrounds();
|
||||
box-shadow: 0 5px 10px rgba(black, 0.2);
|
||||
text-align: center;
|
||||
padding-top: 48px;
|
||||
@@ -18,7 +21,7 @@
|
||||
font-size: 24px;
|
||||
line-height: 105%;
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
font-size: 48px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
@use "breakpoints";
|
||||
@use "colors";
|
||||
|
||||
.team {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
@@ -12,11 +15,11 @@
|
||||
max-width: 400px;
|
||||
padding: 0 16px 64px;
|
||||
|
||||
@include mq($until: desktop) {
|
||||
@include breakpoints.mq($until: desktop) {
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
@include mq($from: desktop) {
|
||||
@include breakpoints.mq($from: desktop) {
|
||||
width: 50%;
|
||||
max-width: 100%;
|
||||
}
|
||||
@@ -57,10 +60,10 @@
|
||||
|
||||
.team__position {
|
||||
display: block;
|
||||
color: $color-brand-primary;
|
||||
color: colors.$color-brand-primary;
|
||||
}
|
||||
|
||||
.team__contact__link {
|
||||
text-decoration: none;
|
||||
color: $color-brand-primary;
|
||||
color: colors.$color-brand-primary;
|
||||
}
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
@use "breakpoints";
|
||||
@use "mixins";
|
||||
|
||||
.teasers {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
@include sectionBackgrounds(0.15);
|
||||
@include mixins.sectionBackgrounds(0.15);
|
||||
margin: 0 -16px 0;
|
||||
|
||||
@include mq($from: desktop) {
|
||||
@include breakpoints.mq($from: desktop) {
|
||||
flex-direction: row;
|
||||
}
|
||||
}
|
||||
@@ -19,15 +22,15 @@
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
@include mq($until: tablet) {
|
||||
@include breakpoints.mq($until: tablet) {
|
||||
padding-bottom: 16px;
|
||||
}
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
@include mq($from: desktop) {
|
||||
@include breakpoints.mq($from: desktop) {
|
||||
width: 33.3333%;
|
||||
}
|
||||
}
|
||||
@@ -40,12 +43,12 @@
|
||||
}
|
||||
|
||||
.teaser__caption {
|
||||
@include sectionBackgroundsFromParent();
|
||||
@include mixins.sectionBackgroundsFromParent();
|
||||
padding: 16px 16px 0;
|
||||
}
|
||||
|
||||
.teaser__form {
|
||||
@include sectionFills();
|
||||
@include mixins.sectionFills();
|
||||
width: 100%;
|
||||
height: auto;
|
||||
display: block;
|
||||
|
||||
@@ -1,17 +1,20 @@
|
||||
@use "breakpoints";
|
||||
@use "colors";
|
||||
|
||||
.testimonial {
|
||||
width: 100%;
|
||||
padding: 0 32px;
|
||||
text-align: center;
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
font-size: 80%;
|
||||
width: 50%;
|
||||
&:not(:last-child) {
|
||||
border-right: 1px solid $color-divider;
|
||||
border-right: 1px solid colors.$color-divider;
|
||||
}
|
||||
}
|
||||
|
||||
@include mq($from: desktop) {
|
||||
@include breakpoints.mq($from: desktop) {
|
||||
width: 25%;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
@use "breakpoints";
|
||||
@use "colors";
|
||||
@use "mixins";
|
||||
|
||||
.tiles {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
@@ -15,7 +19,7 @@
|
||||
padding: 16px;
|
||||
text-decoration: none;
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
width: 50%;
|
||||
padding: 16px;
|
||||
}
|
||||
@@ -26,12 +30,12 @@
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
|
||||
@include mq($from: mobile) {
|
||||
@include breakpoints.mq($from: mobile) {
|
||||
min-height: 250px;
|
||||
padding: 32px;
|
||||
}
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
padding: 32px 32px 0;
|
||||
min-height: 375px;
|
||||
}
|
||||
@@ -42,33 +46,33 @@
|
||||
color: white;
|
||||
text-align: center;
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
width: 70%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
|
||||
.tile__caption__inner {
|
||||
@include sectionBackgrounds(0.75);
|
||||
@include mixins.sectionBackgrounds(0.75);
|
||||
width: 100%;
|
||||
padding: 24px 0;
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
padding: 32px 0;
|
||||
|
||||
.tile:hover .section-incentives & {
|
||||
background-color: $color-incentives;
|
||||
background-color: colors.$color-incentives;
|
||||
}
|
||||
.tile:hover .section-teambuilding & {
|
||||
background-color: $color-teambuilding;
|
||||
background-color: colors.$color-teambuilding;
|
||||
}
|
||||
|
||||
.tile:hover .section-meetings & {
|
||||
background-color: $color-meetings;
|
||||
background-color: colors.$color-meetings;
|
||||
}
|
||||
|
||||
.tile:hover .section-events & {
|
||||
background-color: $color-events;
|
||||
background-color: colors.$color-events;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -77,7 +81,7 @@
|
||||
display: none;
|
||||
padding: 16px 32px 0;
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
.tile:hover & {
|
||||
display: block;
|
||||
}
|
||||
@@ -91,10 +95,10 @@
|
||||
margin-top: -1px;
|
||||
|
||||
polygon {
|
||||
@include sectionFills();
|
||||
@include mixins.sectionFills();
|
||||
}
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
.tile:hover & {
|
||||
display: block;
|
||||
}
|
||||
@@ -114,7 +118,7 @@
|
||||
font-weight: 700;
|
||||
min-height: 54px;
|
||||
|
||||
@include mq($from: tablet) {
|
||||
@include breakpoints.mq($from: tablet) {
|
||||
font-size: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
@use "mixins";
|
||||
|
||||
.video {
|
||||
@include container();
|
||||
@include mixins.container();
|
||||
padding-top: 32px;
|
||||
padding-bottom: 32px;
|
||||
}
|
||||
|
||||
@@ -1,39 +1,39 @@
|
||||
@import "variables";
|
||||
@import "mixins";
|
||||
@import "breakpoints";
|
||||
@use "variables";
|
||||
@use "mixins";
|
||||
@use "breakpoints";
|
||||
|
||||
@import "colors";
|
||||
@import "fonts";
|
||||
@use "colors";
|
||||
@use "fonts";
|
||||
|
||||
@import "base";
|
||||
@import "buttons";
|
||||
@import "page-header";
|
||||
@import "page-footer";
|
||||
@import "layout";
|
||||
@import "sitenav";
|
||||
@import "helpernav";
|
||||
@import "mobilenav";
|
||||
@import "herounit";
|
||||
@import "carousel";
|
||||
@import "slider";
|
||||
@import "configurator";
|
||||
@import "statement";
|
||||
@import "testimonial";
|
||||
@import "brands";
|
||||
@import "iconbar";
|
||||
@import "tiles";
|
||||
@import "card";
|
||||
@import "box";
|
||||
@import "banner";
|
||||
@import "iconnav";
|
||||
@import "forms";
|
||||
@import "teasers";
|
||||
@import "badge";
|
||||
@import "team";
|
||||
@import "search";
|
||||
@import "offerlist";
|
||||
@import "paginator";
|
||||
@import "news";
|
||||
@import "datepicker";
|
||||
@import "cookiefirst";
|
||||
@import "video";
|
||||
@use "base";
|
||||
@use "buttons";
|
||||
@use "page-header";
|
||||
@use "page-footer";
|
||||
@use "layout";
|
||||
@use "sitenav";
|
||||
@use "helpernav";
|
||||
@use "mobilenav";
|
||||
@use "herounit";
|
||||
@use "carousel";
|
||||
@use "slider";
|
||||
@use "configurator";
|
||||
@use "statement";
|
||||
@use "testimonial";
|
||||
@use "brands";
|
||||
@use "iconbar";
|
||||
@use "tiles";
|
||||
@use "card";
|
||||
@use "box";
|
||||
@use "banner";
|
||||
@use "iconnav";
|
||||
@use "forms";
|
||||
@use "teasers";
|
||||
@use "badge";
|
||||
@use "team";
|
||||
@use "search";
|
||||
@use "offerlist";
|
||||
@use "paginator";
|
||||
@use "news";
|
||||
@use "datepicker";
|
||||
@use "cookiefirst";
|
||||
@use "video";
|
||||
|
||||
@@ -1,18 +1,14 @@
|
||||
@import "mixins";
|
||||
@import "colors";
|
||||
@use "mixins";
|
||||
@use "colors";
|
||||
|
||||
@font-face {
|
||||
font-family: 'Cairo';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: url('../fonts/cairo-v2-latin-ext_latin-regular.eot'); /* IE9 Compat Modes */
|
||||
src: local('Cairo'), local('Cairo-Regular'),
|
||||
url('../fonts/cairo-v2-latin-ext_latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
|
||||
url('../fonts/cairo-v2-latin-ext_latin-regular.woff2') format('woff2'), /* Super Modern Browsers */
|
||||
url('../fonts/cairo-v2-latin-ext_latin-regular.woff') format('woff'), /* Modern Browsers */
|
||||
url('../fonts/cairo-v2-latin-ext_latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */
|
||||
url('../fonts/cairo-v2-latin-ext_latin-regular.svg#Cairo') format('svg'); /* Legacy iOS */
|
||||
url('../fonts/cairo-v2-latin-ext_latin-regular.woff2') format('woff2'),
|
||||
url('../fonts/cairo-v2-latin-ext_latin-regular.woff') format('woff');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
@@ -20,13 +16,9 @@
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
font-display: swap;
|
||||
src: url('../fonts/cairo-v2-latin-ext_latin-700.eot'); /* IE9 Compat Modes */
|
||||
src: local('Cairo Bold'), local('Cairo-Bold'),
|
||||
url('../fonts/cairo-v2-latin-ext_latin-700.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
|
||||
url('../fonts/cairo-v2-latin-ext_latin-700.woff2') format('woff2'), /* Super Modern Browsers */
|
||||
url('../fonts/cairo-v2-latin-ext_latin-700.woff') format('woff'), /* Modern Browsers */
|
||||
url('../fonts/cairo-v2-latin-ext_latin-700.ttf') format('truetype'), /* Safari, Android, iOS */
|
||||
url('../fonts/cairo-v2-latin-ext_latin-700.svg#Cairo') format('svg'); /* Legacy iOS */
|
||||
url('../fonts/cairo-v2-latin-ext_latin-700.woff2') format('woff2'),
|
||||
url('../fonts/cairo-v2-latin-ext_latin-700.woff') format('woff');
|
||||
}
|
||||
|
||||
$font-main: 'Cairo';
|
||||
@@ -34,12 +26,8 @@ $font-main: 'Cairo';
|
||||
@font-face {
|
||||
font-family: 'fontello';
|
||||
font-display: swap;
|
||||
src: url('../fonts/fontello.eot?39986861');
|
||||
src: url('../fonts/fontello.eot?39986861#iefix') format('embedded-opentype'),
|
||||
url('../fonts/fontello.woff2?39986861') format('woff2'),
|
||||
url('../fonts/fontello.woff?39986861') format('woff'),
|
||||
url('../fonts/fontello.ttf?39986861') format('truetype'),
|
||||
url('../fonts/fontello.svg?39986861#fontello') format('svg');
|
||||
src: url('../fonts/fontello.woff2?39986861') format('woff2'),
|
||||
url('../fonts/fontello.woff?39986861') format('woff');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
@@ -123,7 +111,7 @@ ul {
|
||||
left: 0;
|
||||
content: "\25CF";
|
||||
font-size: 18px;
|
||||
@include sectionColoursFromParent();
|
||||
@include mixins.sectionColoursFromParent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -141,8 +129,8 @@ p {
|
||||
hr {
|
||||
max-width: 25%;
|
||||
margin: 32px auto 32px 0;
|
||||
color: $color-ruler;
|
||||
background-color: $color-ruler;
|
||||
color: colors.$color-ruler;
|
||||
background-color: colors.$color-ruler;
|
||||
height: 1px;
|
||||
border: none;
|
||||
}
|
||||
@@ -158,7 +146,7 @@ h3,
|
||||
}
|
||||
|
||||
.headline {
|
||||
@include sectionColoursFromParent();
|
||||
@include mixins.sectionColoursFromParent();
|
||||
|
||||
&--icon {
|
||||
display: flex;
|
||||
@@ -192,9 +180,9 @@ h1,
|
||||
display: block;
|
||||
font-size: 16px;
|
||||
line-height: 120%;
|
||||
color: $color-brand-primary;
|
||||
color: colors.$color-brand-primary;
|
||||
text-transform: none;
|
||||
@include sectionColoursFromParent();
|
||||
@include mixins.sectionColoursFromParent();
|
||||
|
||||
&--box {
|
||||
color: white;
|
||||
@@ -229,7 +217,7 @@ h3 {
|
||||
|
||||
&--default {
|
||||
display: inline-block;
|
||||
background-color: $color-brand-primary;
|
||||
background-color: colors.$color-brand-primary;
|
||||
color: white;
|
||||
padding: 4px 16px;
|
||||
}
|
||||
@@ -237,7 +225,7 @@ h3 {
|
||||
&--page-header {
|
||||
display: block;
|
||||
min-width: 186px;
|
||||
background-color: $color-brand-primary;
|
||||
background-color: colors.$color-brand-primary;
|
||||
color: white;
|
||||
font-size: 18px;
|
||||
padding: 0 32px 0 24px;
|
||||
@@ -250,8 +238,8 @@ h3 {
|
||||
display: block;
|
||||
min-width: 220px;
|
||||
text-align: center;
|
||||
background-color: $color-brand-primary;
|
||||
@include sectionBackgroundsFromParent();
|
||||
background-color: colors.$color-brand-primary;
|
||||
@include mixins.sectionBackgroundsFromParent();
|
||||
color: white;
|
||||
line-height: 48px;
|
||||
border: none;
|
||||
@@ -271,7 +259,7 @@ h3 {
|
||||
|
||||
&:hover {
|
||||
background: white;
|
||||
color: $color-font-main;
|
||||
color: colors.$color-font-main;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -280,7 +268,7 @@ h3 {
|
||||
}
|
||||
|
||||
&--icon {
|
||||
background-color: $color-brand-primary;
|
||||
background-color: colors.$color-brand-primary;
|
||||
color: white;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
|
||||
@@ -28,10 +28,10 @@ namespace EP\EpProducts\Command;
|
||||
***************************************************************/
|
||||
|
||||
use EP\EpProducts\Service\DateImportService;
|
||||
use EP\EpProducts\Service\ProductImportSourceFactory;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
|
||||
use TYPO3\CMS\Extbase\Service\CacheService;
|
||||
|
||||
@@ -53,21 +53,29 @@ class DateCommandController extends Command
|
||||
*/
|
||||
protected $configurationManager;
|
||||
|
||||
/**
|
||||
* @var ProductImportSourceFactory
|
||||
*/
|
||||
protected $importSourceFactory;
|
||||
|
||||
/**
|
||||
* @param DateImportService $importService
|
||||
* @param CacheService $cacheService
|
||||
* @param ConfigurationManagerInterface $configurationManager
|
||||
* @param ProductImportSourceFactory $importSourceFactory
|
||||
*/
|
||||
public function __construct
|
||||
(
|
||||
DateImportService $importService,
|
||||
CacheService $cacheService,
|
||||
ConfigurationManagerInterface $configurationManager
|
||||
ConfigurationManagerInterface $configurationManager,
|
||||
ProductImportSourceFactory $importSourceFactory
|
||||
)
|
||||
{
|
||||
$this->dateImportService = $importService;
|
||||
$this->cacheService = $cacheService;
|
||||
$this->configurationManager = $configurationManager;
|
||||
$this->importSourceFactory = $importSourceFactory;
|
||||
|
||||
parent::__construct();
|
||||
}
|
||||
@@ -79,8 +87,15 @@ class DateCommandController extends Command
|
||||
*/
|
||||
public function execute(InputInterface $input, OutputInterface $output): int
|
||||
{
|
||||
$path = GeneralUtility::getFileAbsFileName('fileadmin/xmlexport');
|
||||
$importSource = $this->importSourceFactory->get();
|
||||
$path = $importSource->acquire();
|
||||
if ($path === null) {
|
||||
$output->writeln('No new import available.');
|
||||
return 0;
|
||||
}
|
||||
|
||||
$count = $this->dateImportService->import($path);
|
||||
$importSource->markImported($path);
|
||||
$output->writeln(sprintf('%d rows imported.', $count ));
|
||||
$settings = $this->getSettings();
|
||||
$resellerPageUid = $settings['resellerExportPageUid'];
|
||||
|
||||
@@ -87,12 +87,16 @@ class SearchController extends ActionController
|
||||
|
||||
public function initializeSearchresultAction()
|
||||
{
|
||||
// Process encoded filtersettings from static search result
|
||||
// Process encoded filtersettings from static search result.
|
||||
// Explicit filter settings win: they carry the visitor's current selection,
|
||||
// whereas a stale 'f' riding along on a link would silently replace it.
|
||||
$encodedFilterSettings = GeneralUtility::_GET('f');
|
||||
if ($encodedFilterSettings) {
|
||||
if ($encodedFilterSettings && !$this->request->hasArgument('filterSettings')) {
|
||||
$filterSettingsEncoder = new FilterSettingsEncoder();
|
||||
$filterSettings = $filterSettingsEncoder->decode($encodedFilterSettings);
|
||||
$this->request->setArgument('filterSettings', $filterSettings);
|
||||
if (count($filterSettings) > 0) {
|
||||
$this->request->setArgument('filterSettings', $filterSettings);
|
||||
}
|
||||
}
|
||||
$forcedConceptUids = GeneralUtility::intExplode(',', $this->settings['forcedConceptUids'], true);
|
||||
$this->processFilterSettingsArgument($forcedConceptUids);
|
||||
|
||||
@@ -30,12 +30,17 @@ namespace EP\EpProducts\Domain\Model;
|
||||
class Room
|
||||
{
|
||||
|
||||
const ROOM_TYPE_UNCLASSIFIED = 0;
|
||||
const ROOM_TYPE_FOR_ONE = 1;
|
||||
const ROOM_TYPE_FOR_TWO = 2;
|
||||
const ROOM_TYPE_FOR_THREE = 3;
|
||||
const ROOM_TYPE_FOR_FOUR = 4;
|
||||
const ROOM_TYPE_WITH_OTHERS = 5;
|
||||
const ROOM_TYPE_OTHER = 6;
|
||||
const ROOM_TYPE_FOR_FIVE = 5;
|
||||
const ROOM_TYPE_FOR_SIX = 6;
|
||||
const ROOM_TYPE_FOR_SEVEN = 7;
|
||||
const ROOM_TYPE_FOR_EIGHT = 8;
|
||||
const ROOM_TYPE_FOR_NINE_PLUS = 9;
|
||||
const ROOM_TYPE_WITH_OTHERS = 10;
|
||||
|
||||
const ROOM_STATUS_AVAILABLE = 1;
|
||||
const ROOM_STATUS_ON_REQUEST = 2;
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpProducts\Domain\Model;
|
||||
|
||||
/***************************************************************
|
||||
*
|
||||
* Copyright notice
|
||||
*
|
||||
* (c) 2016 Björn Fromme <[email protected]>, dreipunktnull
|
||||
*
|
||||
* All rights reserved
|
||||
*
|
||||
* This script is part of the TYPO3 project. The TYPO3 project is
|
||||
* free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The GNU General Public License can be found at
|
||||
* http://www.gnu.org/copyleft/gpl.html.
|
||||
*
|
||||
* This script is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* This copyright notice MUST APPEAR in all copies of the script!
|
||||
***************************************************************/
|
||||
|
||||
class RoomMapping extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
|
||||
{
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $code = '';
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
protected $type = 0;
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getCode()
|
||||
{
|
||||
return $this->code;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $code
|
||||
*/
|
||||
public function setCode($code)
|
||||
{
|
||||
$this->code = $code;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getType()
|
||||
{
|
||||
return $this->type;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $type
|
||||
*/
|
||||
public function setType($type)
|
||||
{
|
||||
$this->type = $type;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -76,9 +76,11 @@ class ProductRepository extends AbstractRepository
|
||||
'date.services_included as servicesIncluded', 'date.skipass_included as skiPassIncluded',
|
||||
'date.bus_available as busAvailable', 'date.new as new',
|
||||
'date.min_price as minPrice', 'date.nights as nights', 'date.available as available',
|
||||
'date.pseudo_price as pseudoPrice', 'date.hide_booking_button as hideBookingButton',
|
||||
'room.type as roomType'
|
||||
'date.pseudo_price as pseudoPrice', 'date.hide_booking_button as hideBookingButton'
|
||||
)
|
||||
// The GROUP BY below collapses many room rows per group; an arbitrary
|
||||
// room.type would hide most types from the filter facet.
|
||||
->addSelectLiteral('GROUP_CONCAT(DISTINCT room.type) as roomTypes')
|
||||
->from('tx_epproducts_domain_model_date', 'date')
|
||||
->leftJoin('date', 'tx_epproducts_domain_model_concept', 'con', 'date.concept = con.uid')
|
||||
->leftJoin('date', 'tx_epproducts_domain_model_room', 'room', 'room.date = date.uid')
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpProducts\Domain\Repository;
|
||||
|
||||
/***************************************************************
|
||||
*
|
||||
* Copyright notice
|
||||
*
|
||||
* (c) 2016 Björn Fromme <[email protected]>, dreipunktnull
|
||||
*
|
||||
* All rights reserved
|
||||
*
|
||||
* This script is part of the TYPO3 project. The TYPO3 project is
|
||||
* free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The GNU General Public License can be found at
|
||||
* http://www.gnu.org/copyleft/gpl.html.
|
||||
*
|
||||
* This script is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* This copyright notice MUST APPEAR in all copies of the script!
|
||||
***************************************************************/
|
||||
|
||||
class RoomMappingRepository extends AbstractRepository
|
||||
{}
|
||||
@@ -0,0 +1,244 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpProducts\EpTeam;
|
||||
|
||||
use Psr\Log\LoggerAwareInterface;
|
||||
use Psr\Log\LoggerAwareTrait;
|
||||
use Symfony\Component\HttpClient\HttpClient;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
|
||||
use Symfony\Contracts\HttpClient\HttpClientInterface;
|
||||
use Symfony\Contracts\HttpClient\ResponseInterface;
|
||||
use TYPO3\CMS\Core\Configuration\ExtensionConfiguration;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
|
||||
/**
|
||||
* The MyE&P Team application (Symfony). Separate from EP\EpProducts\MyEP\ApiClient on purpose:
|
||||
* this is a different application on its own host, authenticated with a shared key in a header
|
||||
* instead of the OAuth client-credentials flow MyE&P uses, so it shares neither the base URI nor
|
||||
* the token handling.
|
||||
*/
|
||||
class ApiClient implements LoggerAwareInterface
|
||||
{
|
||||
use LoggerAwareTrait;
|
||||
|
||||
/**
|
||||
* Applied when extension configuration does not override them. Seconds.
|
||||
*/
|
||||
private const DEFAULT_TIMEOUT = 5;
|
||||
private const DEFAULT_MAX_DURATION = 15;
|
||||
|
||||
/**
|
||||
* Status codes the endpoint answers a stored submission with. A conflict is included for the
|
||||
* dedupe the team application may add later - it is not returned today - because a
|
||||
* double-clicked submit button is not something to report.
|
||||
*/
|
||||
private const ACCEPTED_STATUS_CODES = [
|
||||
Response::HTTP_OK,
|
||||
Response::HTTP_CREATED,
|
||||
Response::HTTP_ACCEPTED,
|
||||
Response::HTTP_NO_CONTENT,
|
||||
Response::HTTP_CONFLICT,
|
||||
];
|
||||
|
||||
/**
|
||||
* How much of a rejected response is carried into the exception message. A 400 names the
|
||||
* offending field in its body, which is the only way to tell from a log why a submission
|
||||
* was refused.
|
||||
*/
|
||||
private const ERROR_BODY_EXCERPT_LENGTH = 500;
|
||||
|
||||
/**
|
||||
* Shared, like the MyE&P client: Symfony's CurlHttpClient keeps its connection pool and TLS
|
||||
* session cache per instance. The API key is a constant, so unlike a bearer token it can be
|
||||
* a client default header and the instance can live as long as the request.
|
||||
*/
|
||||
private static ?HttpClientInterface $httpClient = null;
|
||||
|
||||
private ?array $configuration = null;
|
||||
|
||||
/**
|
||||
* Posts a submitted TYPO3 form to POST /api/application-forms.
|
||||
*
|
||||
* @throws ApiException
|
||||
*/
|
||||
public function submitApplicationForm(array $payload): void
|
||||
{
|
||||
$uri = 'api/application-forms';
|
||||
|
||||
// 'json' also sets the Content-Type the endpoint requires - without it the body is not
|
||||
// read as JSON and the answer is a 400.
|
||||
$response = $this->request('POST', $uri, [
|
||||
'json' => $payload,
|
||||
]);
|
||||
|
||||
$statusCode = $this->readStatusCode($response, 'POST', $uri);
|
||||
|
||||
if (false === in_array($statusCode, self::ACCEPTED_STATUS_CODES, true)) {
|
||||
$message = sprintf(
|
||||
'EP Team API returned unexpected status %d for POST %s: %s',
|
||||
$statusCode,
|
||||
$uri,
|
||||
$this->readErrorBody($response)
|
||||
);
|
||||
$this->logWarning($message);
|
||||
|
||||
throw new ApiException($message, $statusCode);
|
||||
}
|
||||
|
||||
$this->logAcceptedSubmission($response, $payload);
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ApiException
|
||||
*/
|
||||
private function request(string $method, string $uri, array $options): ResponseInterface
|
||||
{
|
||||
try {
|
||||
return $this->getHttpClient()->request($method, $uri, $options);
|
||||
} catch (TransportExceptionInterface $e) {
|
||||
$message = sprintf('EP Team API transport error for %s %s: %s', $method, $uri, $e->getMessage());
|
||||
$this->logError($message, ['exception' => $e]);
|
||||
|
||||
throw new ApiException($message, 0, $e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reading the status completes the transfer, so this is also what turns the lazy response
|
||||
* returned by the client into a finished request.
|
||||
*
|
||||
* @throws ApiException
|
||||
*/
|
||||
private function readStatusCode(ResponseInterface $response, string $method, string $uri): int
|
||||
{
|
||||
try {
|
||||
return $response->getStatusCode();
|
||||
} catch (TransportExceptionInterface $e) {
|
||||
$message = sprintf('EP Team API transport error while reading status for %s %s: %s', $method, $uri, $e->getMessage());
|
||||
$this->logError($message, ['exception' => $e]);
|
||||
|
||||
throw new ApiException($message, 0, $e);
|
||||
}
|
||||
}
|
||||
|
||||
private function readErrorBody(ResponseInterface $response): string
|
||||
{
|
||||
try {
|
||||
$body = trim($response->getContent(false));
|
||||
} catch (TransportExceptionInterface $e) {
|
||||
return '<no response body>';
|
||||
}
|
||||
|
||||
if ('' === $body) {
|
||||
return '<empty response body>';
|
||||
}
|
||||
|
||||
if (mb_strlen($body) > self::ERROR_BODY_EXCERPT_LENGTH) {
|
||||
$body = mb_substr($body, 0, self::ERROR_BODY_EXCERPT_LENGTH) . '…';
|
||||
}
|
||||
|
||||
return $body;
|
||||
}
|
||||
|
||||
/**
|
||||
* The submission uuid the endpoint returns is what makes a support question ("did our
|
||||
* application arrive?") answerable from the TYPO3 log alone. Reading the body also drains
|
||||
* the response, which returns the connection to the pool instead of cancelling the transfer.
|
||||
* Deliberately without any of the submitted values: these payloads are personal data.
|
||||
*/
|
||||
private function logAcceptedSubmission(ResponseInterface $response, array $payload): void
|
||||
{
|
||||
try {
|
||||
$data = $response->toArray(false);
|
||||
} catch (\Throwable $e) {
|
||||
// A body that is absent (204) or not JSON costs nothing here - the submission is
|
||||
// stored either way, which the asserted status has already established.
|
||||
return;
|
||||
}
|
||||
|
||||
if (null !== $this->logger) {
|
||||
$this->logger->info('Application form submission accepted by the EP Team API.', [
|
||||
'form' => $payload['form'] ?? null,
|
||||
'pageUid' => $payload['pageUid'] ?? null,
|
||||
'uuid' => $data['uuid'] ?? null,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ApiException
|
||||
*/
|
||||
private function getHttpClient(): HttpClientInterface
|
||||
{
|
||||
if (null !== static::$httpClient) {
|
||||
return static::$httpClient;
|
||||
}
|
||||
|
||||
$config = $this->getConfiguration();
|
||||
$baseUrl = trim((string)($config['epTeamApiBaseUrl'] ?? ''));
|
||||
$apiKey = trim((string)($config['epTeamApiKey'] ?? ''));
|
||||
|
||||
if ('' === $baseUrl) {
|
||||
throw new ApiException('EP Team API base URL is not configured.');
|
||||
}
|
||||
if ('' === $apiKey) {
|
||||
throw new ApiException('EP Team API key is not configured.');
|
||||
}
|
||||
if (0 !== strpos($baseUrl, 'https://')) {
|
||||
// The application answers an http request with a 301 to the https URL, and this
|
||||
// client does not follow redirects, so a plain http base URL fails every submission.
|
||||
$this->logWarning(sprintf('EP Team API base URL is not https (%s); submissions will fail on the redirect.', $baseUrl));
|
||||
}
|
||||
|
||||
$options = [
|
||||
'headers' => [
|
||||
'X-Api-Key' => $apiKey,
|
||||
],
|
||||
];
|
||||
|
||||
// Without these the client falls back to PHP's default_socket_timeout (commonly 60s),
|
||||
// so a stalled API pins a PHP worker for a minute per request - and this call happens
|
||||
// inside the visitor's form submission, with the visitor waiting for it. The defaults
|
||||
// live in code rather than in ext_conf_template.txt: ExtensionConfiguration::get()
|
||||
// returns the stored configuration verbatim and only syncs the template when an
|
||||
// extension has no configuration at all, so a newly added template key is absent until
|
||||
// someone saves extension configuration by hand. Falling back to 0 there would silently
|
||||
// mean "no timeout" - the opposite of what this guard is for. An explicit 0 still
|
||||
// disables.
|
||||
$timeout = (int)($config['epTeamApiTimeout'] ?? self::DEFAULT_TIMEOUT);
|
||||
if ($timeout > 0) {
|
||||
$options['timeout'] = $timeout;
|
||||
}
|
||||
$maxDuration = (int)($config['epTeamApiMaxDuration'] ?? self::DEFAULT_MAX_DURATION);
|
||||
if ($maxDuration > 0) {
|
||||
$options['max_duration'] = $maxDuration;
|
||||
}
|
||||
|
||||
return static::$httpClient = HttpClient::createForBaseUri(rtrim($baseUrl, '/') . '/', $options);
|
||||
}
|
||||
|
||||
private function getConfiguration(): array
|
||||
{
|
||||
if (null === $this->configuration) {
|
||||
$this->configuration = GeneralUtility::makeInstance(ExtensionConfiguration::class)
|
||||
->get('ep_products');
|
||||
}
|
||||
|
||||
return $this->configuration;
|
||||
}
|
||||
|
||||
private function logError(string $message, array $context = []): void
|
||||
{
|
||||
if (null !== $this->logger) {
|
||||
$this->logger->error($message, $context);
|
||||
}
|
||||
}
|
||||
|
||||
private function logWarning(string $message, array $context = []): void
|
||||
{
|
||||
if (null !== $this->logger) {
|
||||
$this->logger->warning($message, $context);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpProducts\EpTeam;
|
||||
|
||||
class ApiException extends \RuntimeException
|
||||
{
|
||||
}
|
||||
@@ -49,8 +49,22 @@ class ApiClient implements LoggerAwareInterface
|
||||
*/
|
||||
private const ACCESS_TOKEN_DEFAULT_TTL = 300;
|
||||
|
||||
/**
|
||||
* Status codes that mean the token was rejected rather than the request being wrong.
|
||||
*/
|
||||
private const UNAUTHORIZED_STATUS_CODES = [Response::HTTP_UNAUTHORIZED, Response::HTTP_FORBIDDEN];
|
||||
|
||||
private static ?AccessToken $accessToken = null;
|
||||
|
||||
/**
|
||||
* Shared on purpose. Symfony's CurlHttpClient keeps its connection pool and TLS session
|
||||
* cache in a CurlClientState owned by the instance, so building a client per call throws
|
||||
* both away and forces a fresh DNS lookup, TCP connect and TLS handshake every time -
|
||||
* TravelinfoController alone makes two calls per page render. The bearer token is passed
|
||||
* per request rather than as a client default so one instance can outlive one token.
|
||||
*/
|
||||
private static ?HttpClientInterface $httpClient = null;
|
||||
|
||||
private ?FrontendInterface $cache = null;
|
||||
|
||||
private ?array $configuration = null;
|
||||
@@ -100,7 +114,10 @@ class ApiClient implements LoggerAwareInterface
|
||||
'json' => $addressData,
|
||||
]);
|
||||
|
||||
$this->assertStatusCode($response, [Response::HTTP_OK, Response::HTTP_CREATED, Response::HTTP_ACCEPTED, Response::HTTP_NO_CONTENT], 'POST', 'contactform');
|
||||
// A conflict means the address is already registered, which is the normal answer to a
|
||||
// resubmitted contact form and not worth reporting.
|
||||
$this->assertStatusCode($response, [Response::HTTP_OK, Response::HTTP_CREATED, Response::HTTP_ACCEPTED, Response::HTTP_NO_CONTENT, Response::HTTP_CONFLICT], 'POST', 'contactform');
|
||||
$this->drainResponse($response);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -183,6 +200,30 @@ class ApiClient implements LoggerAwareInterface
|
||||
*/
|
||||
private function request(string $method, string $uri, array $options = []): ResponseInterface
|
||||
{
|
||||
$response = $this->sendRequest($method, $uri, $options);
|
||||
|
||||
if (false === in_array($this->readStatusCode($response, $method, $uri), self::UNAUTHORIZED_STATUS_CODES, true)) {
|
||||
return $response;
|
||||
}
|
||||
|
||||
// The token outlives a single PHP request, so one the API has stopped accepting - after
|
||||
// a MyEP restart or a revoked client - would keep failing every call for the rest of its
|
||||
// cached lifetime unless it is actively discarded here.
|
||||
$this->logWarning(sprintf('MyEP API rejected the cached access token for %s %s, re-authenticating once', $method, $uri));
|
||||
$this->discardAccessToken();
|
||||
|
||||
return $this->sendRequest($method, $uri, $options);
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ApiException
|
||||
*/
|
||||
private function sendRequest(string $method, string $uri, array $options): ResponseInterface
|
||||
{
|
||||
// Resolved here rather than baked into the client's default options so that the shared
|
||||
// client survives a token change, and so the retry above picks up the fresh token.
|
||||
$options['auth_bearer'] = $this->getAccessToken($this->getConfiguration())->getToken();
|
||||
|
||||
try {
|
||||
return $this->getHttpClient()->request($method, $uri, $options);
|
||||
} catch (TransportExceptionInterface $e) {
|
||||
@@ -199,13 +240,7 @@ class ApiClient implements LoggerAwareInterface
|
||||
*/
|
||||
private function assertStatusCode(ResponseInterface $response, array $expectedStatusCodes, string $method, string $uri): void
|
||||
{
|
||||
try {
|
||||
$statusCode = $response->getStatusCode();
|
||||
} catch (TransportExceptionInterface $e) {
|
||||
$message = sprintf('MyEP API transport error while reading status for %s %s: %s', $method, $uri, $e->getMessage());
|
||||
$this->logError($message, ['exception' => $e]);
|
||||
throw new ApiException($message, 0, $e);
|
||||
}
|
||||
$statusCode = $this->readStatusCode($response, $method, $uri);
|
||||
|
||||
if (true === in_array($statusCode, $expectedStatusCodes, true)) {
|
||||
return;
|
||||
@@ -217,6 +252,39 @@ class ApiClient implements LoggerAwareInterface
|
||||
throw new ApiException($message, $statusCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reading the status completes the transfer, so this is also what turns the lazy response
|
||||
* returned by the client into a finished request. Symfony keeps the status on the response,
|
||||
* so calling this twice costs nothing.
|
||||
*
|
||||
* @throws ApiException
|
||||
*/
|
||||
private function readStatusCode(ResponseInterface $response, string $method, string $uri): int
|
||||
{
|
||||
try {
|
||||
return $response->getStatusCode();
|
||||
} catch (TransportExceptionInterface $e) {
|
||||
$message = sprintf('MyEP API transport error while reading status for %s %s: %s', $method, $uri, $e->getMessage());
|
||||
$this->logError($message, ['exception' => $e]);
|
||||
throw new ApiException($message, 0, $e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads and discards a body nobody else is going to look at. Destroying an unconsumed
|
||||
* response cancels the transfer, which closes the connection instead of returning it to
|
||||
* the pool, so the next call would have to handshake again.
|
||||
*/
|
||||
private function drainResponse(ResponseInterface $response): void
|
||||
{
|
||||
try {
|
||||
$response->getContent(false);
|
||||
} catch (TransportExceptionInterface $e) {
|
||||
// The status has already been asserted, so a failure here costs nothing but the
|
||||
// connection reuse this method exists for.
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ApiException
|
||||
*/
|
||||
@@ -237,13 +305,13 @@ class ApiClient implements LoggerAwareInterface
|
||||
|
||||
private function getHttpClient(): HttpClientInterface
|
||||
{
|
||||
if (null !== static::$httpClient) {
|
||||
return static::$httpClient;
|
||||
}
|
||||
|
||||
$config = $this->getConfiguration();
|
||||
|
||||
static::$accessToken = $this->getAccessToken($config);
|
||||
|
||||
$options = [
|
||||
'auth_bearer' => static::$accessToken->getToken(),
|
||||
];
|
||||
$options = [];
|
||||
|
||||
// Without these the client falls back to PHP's default_socket_timeout (commonly 60s),
|
||||
// so a stalled API pins a PHP worker for a minute per request. The defaults live in
|
||||
@@ -261,7 +329,7 @@ class ApiClient implements LoggerAwareInterface
|
||||
$options['max_duration'] = $maxDuration;
|
||||
}
|
||||
|
||||
return HttpClient::createForBaseUri($config['myEpApiBaseUrl'], $options);
|
||||
return static::$httpClient = HttpClient::createForBaseUri($config['myEpApiBaseUrl'], $options);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -296,7 +364,7 @@ class ApiClient implements LoggerAwareInterface
|
||||
*/
|
||||
private function getAccessToken(array $config): AccessToken
|
||||
{
|
||||
if (null !== static::$accessToken && false === static::$accessToken->hasExpired()) {
|
||||
if (true === $this->isTokenUsable(static::$accessToken)) {
|
||||
return static::$accessToken;
|
||||
}
|
||||
|
||||
@@ -305,7 +373,7 @@ class ApiClient implements LoggerAwareInterface
|
||||
$cachedToken = $this->getCache()->get(self::ACCESS_TOKEN_CACHE_IDENTIFIER);
|
||||
if (is_array($cachedToken) && isset($cachedToken['access_token'])) {
|
||||
$token = new AccessToken($cachedToken);
|
||||
if (false === $token->hasExpired()) {
|
||||
if (true === $this->isTokenUsable($token)) {
|
||||
static::$accessToken = $token;
|
||||
|
||||
return static::$accessToken;
|
||||
@@ -313,7 +381,7 @@ class ApiClient implements LoggerAwareInterface
|
||||
}
|
||||
|
||||
try {
|
||||
static::$accessToken = $this->getProvider($config)->getAccessToken('client_credentials');
|
||||
static::$accessToken = $this->normalizeToken($this->getProvider($config)->getAccessToken('client_credentials'));
|
||||
$this->cacheAccessToken(static::$accessToken);
|
||||
} catch (IdentityProviderException $e) {
|
||||
$message = sprintf('MyEP OAuth token request failed: %s', $e->getMessage());
|
||||
@@ -332,16 +400,53 @@ class ApiClient implements LoggerAwareInterface
|
||||
return static::$accessToken;
|
||||
}
|
||||
|
||||
private function cacheAccessToken(AccessToken $token): void
|
||||
/**
|
||||
* AccessToken::hasExpired() throws for a token that reports no expiry, so it cannot be used
|
||||
* as the check - a token without one is simply treated as unusable and replaced. The same
|
||||
* margin as the cache lifetime is applied on read as well, so a token cannot lapse between
|
||||
* this check and the API call that uses it, whichever node wrote the cache entry.
|
||||
*/
|
||||
private function isTokenUsable(?AccessToken $token): bool
|
||||
{
|
||||
if (null === $token) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$expires = $token->getExpires();
|
||||
|
||||
if (null === $expires) {
|
||||
$lifetime = self::ACCESS_TOKEN_DEFAULT_TTL;
|
||||
} else {
|
||||
$lifetime = $expires - time() - self::ACCESS_TOKEN_EXPIRY_MARGIN;
|
||||
return false;
|
||||
}
|
||||
|
||||
return $expires - self::ACCESS_TOKEN_EXPIRY_MARGIN > time();
|
||||
}
|
||||
|
||||
/**
|
||||
* A token that reports no expiry cannot be validated on read - isTokenUsable() rejects it
|
||||
* and AccessToken::hasExpired() throws for it - so it is given the fallback lifetime here,
|
||||
* once, and the rest of the class can treat every token the same way.
|
||||
*/
|
||||
private function normalizeToken(AccessToken $token): AccessToken
|
||||
{
|
||||
if (null !== $token->getExpires()) {
|
||||
return $token;
|
||||
}
|
||||
|
||||
return new AccessToken($token->jsonSerialize() + ['expires_in' => self::ACCESS_TOKEN_DEFAULT_TTL]);
|
||||
}
|
||||
|
||||
private function discardAccessToken(): void
|
||||
{
|
||||
static::$accessToken = null;
|
||||
$this->getCache()->remove(self::ACCESS_TOKEN_CACHE_IDENTIFIER);
|
||||
}
|
||||
|
||||
private function cacheAccessToken(AccessToken $token): void
|
||||
{
|
||||
// normalizeToken() has already given a token without a reported expiry the fallback
|
||||
// lifetime, so there is always a real expiry to subtract the margin from here.
|
||||
$lifetime = $token->getExpires() - time() - self::ACCESS_TOKEN_EXPIRY_MARGIN;
|
||||
|
||||
if ($lifetime <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -60,11 +60,6 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface
|
||||
*/
|
||||
protected $pid = 0;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $roomMappings = [];
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
@@ -85,6 +80,16 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface
|
||||
*/
|
||||
protected $cacheService;
|
||||
|
||||
/**
|
||||
* @var ProductImportSourceFactory
|
||||
*/
|
||||
protected $importSourceFactory;
|
||||
|
||||
/**
|
||||
* @var RoomTypeResolver
|
||||
*/
|
||||
protected $roomTypeResolver;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
@@ -95,10 +100,19 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface
|
||||
/**
|
||||
* @param ConfigurationManagerInterface $configurationManager
|
||||
* @param CacheService $cacheService
|
||||
* @param ProductImportSourceFactory $importSourceFactory
|
||||
* @param RoomTypeResolver $roomTypeResolver
|
||||
*/
|
||||
public function __construct(ConfigurationManagerInterface $configurationManager, CacheService $cacheService) {
|
||||
public function __construct(
|
||||
ConfigurationManagerInterface $configurationManager,
|
||||
CacheService $cacheService,
|
||||
ProductImportSourceFactory $importSourceFactory,
|
||||
RoomTypeResolver $roomTypeResolver
|
||||
) {
|
||||
$this->configurationManager = $configurationManager;
|
||||
$this->cacheService = $cacheService;
|
||||
$this->importSourceFactory = $importSourceFactory;
|
||||
$this->roomTypeResolver = $roomTypeResolver;
|
||||
|
||||
$settings = GeneralUtility::removeDotsFromTS(
|
||||
$this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT)
|
||||
@@ -119,9 +133,8 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface
|
||||
public function import($path): int
|
||||
{
|
||||
$this->db = $this->getDbConnection();
|
||||
$this->getRoomMappings();
|
||||
$this->getHotelMappings();
|
||||
$this->importPickups();
|
||||
$this->importPickups($path);
|
||||
$this->createTempTables();
|
||||
$this->logger->info('starting product import');
|
||||
$dateCount = $this->parseXmlFilesForProducts($path);
|
||||
@@ -135,24 +148,7 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface
|
||||
|
||||
public function isImportRequired(): bool
|
||||
{
|
||||
$timestampService = new ImportTimestampService();
|
||||
|
||||
return $timestampService->isImportRequired(
|
||||
'fileadmin/xmlexport/uebertragung.info',
|
||||
'fileadmin/products_import.info'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $path
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function checkActiveUpload($path): bool
|
||||
{
|
||||
$tempFile = $path . '/.pureftpd-upload.*';
|
||||
|
||||
return count(glob($tempFile)) > 0;
|
||||
return $this->importSourceFactory->get()->isNewImportAvailable();
|
||||
}
|
||||
|
||||
public function parseXmlFilesForProducts($path): int
|
||||
@@ -600,13 +596,9 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface
|
||||
continue;
|
||||
}
|
||||
|
||||
$roomTypeKey = mb_strtolower($code);
|
||||
if (array_key_exists($roomTypeKey, $this->roomMappings)) {
|
||||
$roomType = $this->roomMappings[$roomTypeKey];
|
||||
} else {
|
||||
$this->logger->warning('room type not found', ['code' => $code]);
|
||||
continue;
|
||||
}
|
||||
$label = (string) $roomXml->attributes()['zimmertext'];
|
||||
$roomMinPax = (int) $roomXml->attributes()['MinPax'];
|
||||
$pax = (int) $roomXml->attributes()['MaxPax'];
|
||||
|
||||
$available = (int) $roomXml->attributes()['verfuegbar'];
|
||||
$price = (int) $roomXml->attributes()['preis'];
|
||||
@@ -616,12 +608,23 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface
|
||||
continue;
|
||||
}
|
||||
|
||||
$pax = (int) $roomXml->attributes()['MinPax'];
|
||||
if (0 === $minPax || $pax < $minPax) {
|
||||
$minPax = $pax;
|
||||
$roomType = $this->roomTypeResolver->resolve($code, $label, $pax, $roomMinPax);
|
||||
|
||||
if ($pax < 1 && $roomMinPax < 1) {
|
||||
$this->logger->warning('room without occupancy', ['code' => $code, 'zimmertext' => $label]);
|
||||
}
|
||||
|
||||
if ($this->roomTypeResolver->needsReview($code, $label, $pax)) {
|
||||
$this->logger->warning(
|
||||
'single-occupancy room without single-use marker',
|
||||
['code' => $code, 'zimmertext' => $label]
|
||||
);
|
||||
}
|
||||
|
||||
if (0 === $minPax || $roomMinPax < $minPax) {
|
||||
$minPax = $roomMinPax;
|
||||
}
|
||||
|
||||
$pax = (int) $roomXml->attributes()['MaxPax'];
|
||||
$availableTotal += $available * $pax;
|
||||
|
||||
// Determine lowest price of available rooms
|
||||
@@ -654,7 +657,7 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface
|
||||
'bus_pro_id' => (int) $roomXml->attributes()['idbuspro_zimmer'],
|
||||
'code' => $code,
|
||||
'type' => $roomType,
|
||||
'name' => (string) $roomXml->attributes()['zimmertext'],
|
||||
'name' => $label,
|
||||
'pax' => $pax,
|
||||
'nights' => (int) $roomXml->attributes()['naechte'],
|
||||
'price' => $price,
|
||||
@@ -797,16 +800,6 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface
|
||||
}
|
||||
}
|
||||
|
||||
protected function getRoomMappings(): void
|
||||
{
|
||||
$sql = 'SELECT code, type FROM tx_epproducts_domain_model_roommapping WHERE deleted = 0 AND hidden = 0';
|
||||
$roomMappings = $this->db->fetchAllAssociative($sql);
|
||||
foreach ($roomMappings as $mapping) {
|
||||
$key = trim(mb_strtolower($mapping['code']));
|
||||
$this->roomMappings[$key] = $mapping['type'];
|
||||
}
|
||||
}
|
||||
|
||||
protected function getHotelMappings(): void
|
||||
{
|
||||
$sql = '
|
||||
@@ -877,12 +870,13 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface
|
||||
}
|
||||
}
|
||||
|
||||
protected function importPickups(): void
|
||||
protected function importPickups(string $path): void
|
||||
{
|
||||
libxml_use_internal_errors (true);
|
||||
$path = GeneralUtility::getFileAbsFileName('fileadmin/xmlexport/zustiege.xml');
|
||||
if (!$xmlData = simplexml_load_string(file_get_contents($path))) {
|
||||
$file = $path . '/zustiege.xml';
|
||||
if (!is_file($file) || !$xmlData = simplexml_load_string((string) file_get_contents($file))) {
|
||||
libxml_clear_errors();
|
||||
$this->logger->warning('pickup xml missing or invalid', ['file' => $file]);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace EP\EpProducts\Service;
|
||||
|
||||
use EP\EpProducts\Domain\Model\Dto\FilterOptions;
|
||||
use EP\EpProducts\Domain\Model\Room;
|
||||
use EP\EpProducts\Domain\Model\SearchResult;
|
||||
use Symfony\Component\OptionsResolver\Options;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
@@ -212,6 +213,12 @@ class FilterService implements SingletonInterface
|
||||
}
|
||||
}
|
||||
foreach ($item['rooms'] as $roomType) {
|
||||
// Type 0 is not a room (Baby) and must never become a filter option:
|
||||
// it has no label, so it would render as an empty checkbox and leave
|
||||
// a hole in the option list.
|
||||
if ((int) $roomType === Room::ROOM_TYPE_UNCLASSIFIED) {
|
||||
continue;
|
||||
}
|
||||
if (!\in_array($roomType, $roomTypes, false)) {
|
||||
$roomTypes[] = $roomType;
|
||||
}
|
||||
|
||||
@@ -76,11 +76,28 @@ class FilterSettingsEncoder
|
||||
return implode('|', $encoded);
|
||||
}
|
||||
|
||||
/**
|
||||
* Decodes an encoded filter settings string.
|
||||
*
|
||||
* The format is strictly positional, so a string whose field count does not
|
||||
* match the mapping cannot be interpreted: every field after a missing one
|
||||
* would be read into the wrong setting. Such input is rejected outright
|
||||
* rather than silently producing a shifted - and therefore wrong - result.
|
||||
*
|
||||
* @param string $data
|
||||
* @return array the decoded settings, or an empty array if $data is malformed
|
||||
*/
|
||||
public function decode(string $data): array
|
||||
{
|
||||
$decoded = [];
|
||||
$mapping = $this->getMapping();
|
||||
$values = explode('|', $data);
|
||||
foreach ($this->getMapping() as $index => $property)
|
||||
|
||||
if (count($values) !== count($mapping)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$decoded = [];
|
||||
foreach ($mapping as $index => $property)
|
||||
{
|
||||
[$name, $type] = $property;
|
||||
$value = $values[$index];
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpProducts\Service;
|
||||
|
||||
use TYPO3\CMS\Core\SingletonInterface;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
|
||||
/**
|
||||
* Legacy import source: the busProNet exporter drops the XML files straight into
|
||||
* fileadmin/xmlexport/ (historically via pure-ftpd on the server). Kept as an
|
||||
* opt-in fallback so the import can run without the SFTP pull — selected with the
|
||||
* `productImportSource = local` extension configuration switch.
|
||||
*/
|
||||
final class LocalImportSource implements ProductImportSource, SingletonInterface
|
||||
{
|
||||
private const XML_DIR = 'fileadmin/xmlexport';
|
||||
private const UPLOAD_MARKER = 'fileadmin/xmlexport/uebertragung.info';
|
||||
private const IMPORT_MARKER = 'fileadmin/products_import.info';
|
||||
|
||||
public function acquire(): ?string
|
||||
{
|
||||
if (!$this->isNewImportAvailable()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return GeneralUtility::getFileAbsFileName(self::XML_DIR);
|
||||
}
|
||||
|
||||
public function markImported(string $path): void
|
||||
{
|
||||
(new ImportTimestampService())->writeImportTimestamp(self::IMPORT_MARKER);
|
||||
}
|
||||
|
||||
public function isNewImportAvailable(): bool
|
||||
{
|
||||
$timestampService = new ImportTimestampService();
|
||||
|
||||
$uploadMarkerPath = GeneralUtility::getFileAbsFileName(self::UPLOAD_MARKER);
|
||||
if ($uploadMarkerPath === '' || !is_file($uploadMarkerPath)) {
|
||||
// No supplier marker at all: import whatever is in the folder (legacy behaviour).
|
||||
return true;
|
||||
}
|
||||
|
||||
$uploadedAt = $timestampService->readImportTimestamp(self::UPLOAD_MARKER);
|
||||
$lastImportedAt = $timestampService->readImportTimestamp(self::IMPORT_MARKER);
|
||||
|
||||
return $uploadedAt === null || $lastImportedAt === null || $uploadedAt > $lastImportedAt;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpProducts\Service;
|
||||
|
||||
/**
|
||||
* A source of the busProNet product export (Ziel_*.xml, zustiege.xml,
|
||||
* uebertragung.info). Implementations either read a local drop directory or
|
||||
* pull the files from a remote SFTP server; the caller does not care which.
|
||||
*/
|
||||
interface ProductImportSource
|
||||
{
|
||||
/**
|
||||
* Returns a local directory ready to hand to {@see DateImportService::import()},
|
||||
* or null when there is nothing newer than the last successful import.
|
||||
*
|
||||
* @throws SftpImportException on an unrecoverable acquisition failure
|
||||
*/
|
||||
public function acquire(): ?string;
|
||||
|
||||
/**
|
||||
* Called once {@see DateImportService::import()} of the acquired path has
|
||||
* succeeded, so the source can advance its "last imported" bookkeeping.
|
||||
*/
|
||||
public function markImported(string $path): void;
|
||||
|
||||
/**
|
||||
* Best-effort, side-effect-free check for whether a newer export is available.
|
||||
*/
|
||||
public function isNewImportAvailable(): bool;
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpProducts\Service;
|
||||
|
||||
use TYPO3\CMS\Core\Configuration\ExtensionConfiguration;
|
||||
use TYPO3\CMS\Core\SingletonInterface;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
|
||||
/**
|
||||
* Picks the product import source based on the `productImportSource` extension
|
||||
* configuration switch: `sftp` (default) pulls from the remote SFTP server,
|
||||
* `local` reads the legacy fileadmin/xmlexport/ drop directory.
|
||||
*/
|
||||
final class ProductImportSourceFactory implements SingletonInterface
|
||||
{
|
||||
public const MODE_SFTP = 'sftp';
|
||||
public const MODE_LOCAL = 'local';
|
||||
|
||||
public function get(): ProductImportSource
|
||||
{
|
||||
if ($this->getMode() === self::MODE_LOCAL) {
|
||||
return GeneralUtility::makeInstance(LocalImportSource::class);
|
||||
}
|
||||
|
||||
return GeneralUtility::makeInstance(SftpImportSource::class);
|
||||
}
|
||||
|
||||
public function getMode(): string
|
||||
{
|
||||
$config = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get('ep_products');
|
||||
$mode = strtolower(trim((string)(is_array($config) ? ($config['productImportSource'] ?? '') : '')));
|
||||
|
||||
return $mode === self::MODE_LOCAL ? self::MODE_LOCAL : self::MODE_SFTP;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,129 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpProducts\Service;
|
||||
|
||||
/***************************************************************
|
||||
*
|
||||
* Copyright notice
|
||||
*
|
||||
* (c) 2016 Björn Fromme <[email protected]>, dreipunktnull
|
||||
*
|
||||
* All rights reserved
|
||||
*
|
||||
* This script is part of the TYPO3 project. The TYPO3 project is
|
||||
* free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The GNU General Public License can be found at
|
||||
* http://www.gnu.org/copyleft/gpl.html.
|
||||
*
|
||||
* This script is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* This copyright notice MUST APPEAR in all copies of the script!
|
||||
***************************************************************/
|
||||
|
||||
use EP\EpProducts\Domain\Model\Room;
|
||||
|
||||
/**
|
||||
* Derives the room type from the data each <preis> element carries.
|
||||
*
|
||||
* Replaces the former tx_epproducts_domain_model_roommapping lookup: zimmercode is
|
||||
* neither unique per room nor a function of room type, so a code-keyed table cannot
|
||||
* classify this data. MaxPax is the advertised occupancy and is present on every row.
|
||||
*/
|
||||
class RoomTypeResolver
|
||||
{
|
||||
/**
|
||||
* Phrases in zimmertext that mark a bed shared with other customers.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
const LABEL_PATTERNS_WITH_OTHERS = [
|
||||
'bett im',
|
||||
'mit ander',
|
||||
];
|
||||
|
||||
/**
|
||||
* Phrases in zimmertext that mark a deliberate single use of a larger room.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
const LABEL_PATTERNS_SINGLE_USE = [
|
||||
'einzel',
|
||||
'1 person',
|
||||
];
|
||||
|
||||
/**
|
||||
* @param string $code zimmercode
|
||||
* @param string $label zimmertext
|
||||
* @param int $maxPax MaxPax
|
||||
* @param int $minPax MinPax
|
||||
* @return int one of the Room::ROOM_TYPE_* constants
|
||||
*/
|
||||
public function resolve(string $code, string $label, int $maxPax, int $minPax): int
|
||||
{
|
||||
// Not a room: "Babypreis für 0-2 Jährige". Kept in the date record for its
|
||||
// price and availability, but hidden from the filter.
|
||||
if ($code === DateImportService::CODE_BABYROOM) {
|
||||
return Room::ROOM_TYPE_UNCLASSIFIED;
|
||||
}
|
||||
|
||||
if ($this->matchesAny($label, static::LABEL_PATTERNS_WITH_OTHERS)) {
|
||||
return Room::ROOM_TYPE_WITH_OTHERS;
|
||||
}
|
||||
|
||||
$pax = $maxPax > 0 ? $maxPax : $minPax;
|
||||
|
||||
if ($pax >= 1) {
|
||||
// Type numbering is chosen so that type === pax for pax 1-8.
|
||||
return $pax >= 9 ? Room::ROOM_TYPE_FOR_NINE_PLUS : $pax;
|
||||
}
|
||||
|
||||
// No usable occupancy - should never happen on current data, the caller logs it.
|
||||
return Room::ROOM_TYPE_WITH_OTHERS;
|
||||
}
|
||||
|
||||
/**
|
||||
* Tripwire for an under-matching label pattern: a row classified as a single room
|
||||
* whose label carries no single-use marker is most likely a shared bed phrased in
|
||||
* a way LABEL_PATTERNS_WITH_OTHERS does not yet cover.
|
||||
*
|
||||
* @param string $code zimmercode
|
||||
* @param string $label zimmertext
|
||||
* @param int $maxPax MaxPax
|
||||
* @return bool
|
||||
*/
|
||||
public function needsReview(string $code, string $label, int $maxPax): bool
|
||||
{
|
||||
if ($this->resolve($code, $label, $maxPax, $maxPax) !== Room::ROOM_TYPE_FOR_ONE) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($maxPax !== 1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return !$this->matchesAny($label, static::LABEL_PATTERNS_SINGLE_USE);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $label
|
||||
* @param array $patterns
|
||||
* @return bool
|
||||
*/
|
||||
protected function matchesAny(string $label, array $patterns): bool
|
||||
{
|
||||
foreach ($patterns as $pattern) {
|
||||
if (mb_strpos(mb_strtolower($label), mb_strtolower($pattern)) !== false) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -31,6 +31,7 @@ use EP\EpProducts\Domain\Model\SearchResult;
|
||||
use EP\EpProducts\Domain\Repository\ProductRepository;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
use TYPO3\CMS\Core\SingletonInterface;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
|
||||
class SearchResultService implements SingletonInterface
|
||||
{
|
||||
@@ -216,8 +217,10 @@ class SearchResultService implements SingletonInterface
|
||||
$item['filterMetadata']['boardTypes'][] = $boardType;
|
||||
}
|
||||
|
||||
if (isset($row['roomType']) && !\in_array($row['roomType'], $item['rooms'], false)) {
|
||||
$item['rooms'][] = $row['roomType'];
|
||||
foreach (GeneralUtility::trimExplode(',', (string) ($row['roomTypes'] ?? ''), true) as $roomType) {
|
||||
if (!\in_array($roomType, $item['rooms'], false)) {
|
||||
$item['rooms'][] = $roomType;
|
||||
}
|
||||
}
|
||||
|
||||
if (!\in_array($row['nights'], $item['nights'], false)) {
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpProducts\Service;
|
||||
|
||||
class SftpImportException extends \RuntimeException
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,532 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpProducts\Service;
|
||||
|
||||
use phpseclib3\Net\SFTP;
|
||||
use Psr\Log\LoggerAwareInterface;
|
||||
use Psr\Log\LoggerAwareTrait;
|
||||
use TYPO3\CMS\Core\Configuration\ExtensionConfiguration;
|
||||
use TYPO3\CMS\Core\Core\Environment;
|
||||
use TYPO3\CMS\Core\SingletonInterface;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
|
||||
/**
|
||||
* Pulls the busProNet product export (Ziel_*.xml, zustiege.xml, uebertragung.info)
|
||||
* from a remote SFTP server into a local staging directory so the existing
|
||||
* {@see DateImportService::import()} can keep operating on a plain local folder.
|
||||
*
|
||||
* Change detection compares the remote uebertragung.info timestamp against the
|
||||
* staged copy of the last successfully imported export
|
||||
* (var/transient/ep_products_import/current/uebertragung.info) — not the
|
||||
* fileadmin/products_import.info marker, which is now display-only.
|
||||
*/
|
||||
final class SftpImportSource implements ProductImportSource, SingletonInterface, LoggerAwareInterface
|
||||
{
|
||||
use LoggerAwareTrait;
|
||||
|
||||
private const MARKER_FILE = 'uebertragung.info';
|
||||
private const PICKUPS_FILE = 'zustiege.xml';
|
||||
private const PRODUCT_PREFIX = 'Ziel';
|
||||
private const MARKER_TS_FORMAT = 'd.m.Y H:i:s';
|
||||
private const STAGING_SUBDIR = 'ep_products_import';
|
||||
private const PUBLISHED_DIR = 'current';
|
||||
|
||||
/** phpseclib rawlist() attribute value for a directory (NET_SFTP_TYPE_DIRECTORY). */
|
||||
private const REMOTE_TYPE_DIRECTORY = 2;
|
||||
|
||||
private const IMPORT_MARKER = 'fileadmin/products_import.info';
|
||||
|
||||
/**
|
||||
* @var array|null
|
||||
*/
|
||||
private $configuration;
|
||||
|
||||
/**
|
||||
* {@see ProductImportSource::acquire()} — alias for {@see fetchIfNewer()}.
|
||||
*/
|
||||
public function acquire(): ?string
|
||||
{
|
||||
return $this->fetchIfNewer();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@see ProductImportSource::markImported()} — publish the download as the new
|
||||
* change-detection baseline (only reached after a successful import), then
|
||||
* refresh the display-only marker for the BE module and system-info toolbar.
|
||||
*/
|
||||
public function markImported(string $path): void
|
||||
{
|
||||
$this->commit($path);
|
||||
(new ImportTimestampService())->writeImportTimestamp(self::IMPORT_MARKER);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@see ProductImportSource::isNewImportAvailable()} — alias for {@see isRemoteNewer()}.
|
||||
*/
|
||||
public function isNewImportAvailable(): bool
|
||||
{
|
||||
return $this->isRemoteNewer();
|
||||
}
|
||||
|
||||
/**
|
||||
* Timestamp of the export currently offered on the remote server, or null when
|
||||
* the marker is absent/unreadable/unparseable (supplier upload not finished).
|
||||
*/
|
||||
public function getRemoteUploadTimestamp(): ?\DateTime
|
||||
{
|
||||
$config = $this->buildConfig();
|
||||
$sftp = $this->connect($config);
|
||||
try {
|
||||
[, $markerBytes] = $this->readRemoteMarker($sftp, $config['remotePath']);
|
||||
} finally {
|
||||
$sftp->disconnect();
|
||||
}
|
||||
|
||||
return $markerBytes !== null ? $this->parseMarkerTimestamp($markerBytes) : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Timestamp of the export we last successfully imported (staged marker copy).
|
||||
*/
|
||||
public function getStagedImportedTimestamp(): ?\DateTime
|
||||
{
|
||||
$marker = $this->stagingBasePath() . '/' . self::PUBLISHED_DIR . '/' . self::MARKER_FILE;
|
||||
if (!is_file($marker)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $this->parseMarkerTimestamp((string)file_get_contents($marker));
|
||||
}
|
||||
|
||||
/**
|
||||
* True when the remote export is newer than the last imported one (or nothing
|
||||
* has been imported yet). False when there is nothing to do.
|
||||
*/
|
||||
public function isRemoteNewer(): bool
|
||||
{
|
||||
$remoteTs = $this->getRemoteUploadTimestamp();
|
||||
if ($remoteTs === null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$stagedTs = $this->getStagedImportedTimestamp();
|
||||
|
||||
return $stagedTs === null || $remoteTs > $stagedTs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Freshness check + (only when newer) full download into a fresh temp dir.
|
||||
* Returns the temp-dir path — NOT yet published. The caller runs
|
||||
* DateImportService::import() against it and calls {@see commit()} on success.
|
||||
* Returns null when the remote export is not newer / not ready.
|
||||
*
|
||||
* @throws SftpImportException on connect/auth/host-key/partial-transfer failure
|
||||
*/
|
||||
public function fetchIfNewer(): ?string
|
||||
{
|
||||
$this->cleanupStale();
|
||||
$config = $this->buildConfig();
|
||||
$sftp = $this->connect($config);
|
||||
|
||||
try {
|
||||
[$remoteDir, $markerBytes] = $this->readRemoteMarker($sftp, $config['remotePath']);
|
||||
$remoteTs = $markerBytes !== null ? $this->parseMarkerTimestamp($markerBytes) : null;
|
||||
|
||||
if ($remoteTs === null) {
|
||||
$this->logWarning('remote upload marker missing or unparseable; skipping product import', [
|
||||
'host' => $config['host'],
|
||||
'remotePath' => $config['remotePath'],
|
||||
]);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
$stagedTs = $this->getStagedImportedTimestamp();
|
||||
if ($stagedTs !== null && $remoteTs <= $stagedTs) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $this->downloadInto($sftp, $remoteDir, $markerBytes);
|
||||
} finally {
|
||||
$sftp->disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unconditional download into a fresh temp dir. Returns the temp-dir path.
|
||||
*
|
||||
* @throws SftpImportException
|
||||
*/
|
||||
public function fetch(): string
|
||||
{
|
||||
$this->cleanupStale();
|
||||
$config = $this->buildConfig();
|
||||
$sftp = $this->connect($config);
|
||||
|
||||
try {
|
||||
[$remoteDir, $markerBytes] = $this->readRemoteMarker($sftp, $config['remotePath']);
|
||||
if ($markerBytes === null) {
|
||||
throw new SftpImportException(
|
||||
'Remote export has no readable ' . self::MARKER_FILE . ' under "' . $config['remotePath'] . '"'
|
||||
);
|
||||
}
|
||||
|
||||
return $this->downloadInto($sftp, $remoteDir, $markerBytes);
|
||||
} finally {
|
||||
$sftp->disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Publish a temp dir produced by {@see fetchIfNewer()} / {@see fetch()} to
|
||||
* .../current, making its marker the new change-detection baseline. Call only
|
||||
* after import() succeeded.
|
||||
*
|
||||
* @throws SftpImportException
|
||||
*/
|
||||
public function commit(string $stagedPath): string
|
||||
{
|
||||
$base = $this->stagingBasePath();
|
||||
$stagedPath = rtrim($stagedPath, '/');
|
||||
|
||||
if (strpos($stagedPath . '/', $base . '/') !== 0 || !is_dir($stagedPath)) {
|
||||
throw new SftpImportException('Refusing to publish unknown staging directory: ' . $stagedPath);
|
||||
}
|
||||
|
||||
$published = $base . '/' . self::PUBLISHED_DIR;
|
||||
|
||||
if (is_dir($published)) {
|
||||
$retired = $published . '.old-' . time() . '-' . bin2hex(random_bytes(3));
|
||||
if (!@rename($published, $retired)) {
|
||||
throw new SftpImportException('Cannot move previous import aside: ' . $published);
|
||||
}
|
||||
}
|
||||
|
||||
if (!@rename($stagedPath, $published)) {
|
||||
throw new SftpImportException('Cannot publish staging directory to ' . $published);
|
||||
}
|
||||
|
||||
foreach ((array)glob($base . '/' . self::PUBLISHED_DIR . '.old-*', GLOB_ONLYDIR) as $old) {
|
||||
GeneralUtility::rmdir($old, true);
|
||||
}
|
||||
|
||||
return $published;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array{host:string,port:int,user:string,password:string,remotePath:string,timeout:int,hostKey:string} $config
|
||||
*/
|
||||
private function connect(array $config): SFTP
|
||||
{
|
||||
try {
|
||||
$sftp = new SFTP($config['host'], $config['port'], $config['timeout']);
|
||||
} catch (\Throwable $e) {
|
||||
throw new SftpImportException(
|
||||
sprintf('Cannot connect to SFTP host %s:%d: %s', $config['host'], $config['port'], $e->getMessage()),
|
||||
0,
|
||||
$e
|
||||
);
|
||||
}
|
||||
|
||||
if ($config['hostKey'] !== '') {
|
||||
$this->verifyHostKey($sftp, $config['host'], $config['hostKey']);
|
||||
}
|
||||
|
||||
try {
|
||||
$authenticated = $sftp->login($config['user'], $config['password']);
|
||||
} catch (\Throwable $e) {
|
||||
throw new SftpImportException(
|
||||
sprintf('Cannot connect to SFTP host %s:%d: %s', $config['host'], $config['port'], $e->getMessage()),
|
||||
0,
|
||||
$e
|
||||
);
|
||||
}
|
||||
|
||||
if ($authenticated !== true) {
|
||||
throw new SftpImportException(sprintf('SFTP authentication failed for user "%s"', $config['user']));
|
||||
}
|
||||
|
||||
return $sftp;
|
||||
}
|
||||
|
||||
private function verifyHostKey(SFTP $sftp, string $host, string $expected): void
|
||||
{
|
||||
try {
|
||||
$actual = $sftp->getServerPublicHostKey();
|
||||
} catch (\Throwable $e) {
|
||||
throw new SftpImportException('Cannot read SSH host key for ' . $host . ': ' . $e->getMessage(), 0, $e);
|
||||
}
|
||||
|
||||
if ($actual === false) {
|
||||
throw new SftpImportException('Cannot read SSH host key for ' . $host);
|
||||
}
|
||||
|
||||
$expected = trim($expected);
|
||||
$actual = trim($actual);
|
||||
|
||||
if (hash_equals($actual, $expected)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$parts = explode(' ', $actual);
|
||||
$rawKey = isset($parts[1]) ? base64_decode($parts[1], true) : false;
|
||||
if ($rawKey !== false) {
|
||||
$fingerprint = 'SHA256:' . rtrim(base64_encode(hash('sha256', $rawKey, true)), '=');
|
||||
if (hash_equals($fingerprint, $expected)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
throw new SftpImportException('SSH host key mismatch for ' . $host . ' — refusing to connect');
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads the upload marker, probing each acceptable form of the configured
|
||||
* remote directory. Some SFTP servers (e.g. Hetzner Storage Box) only accept
|
||||
* paths relative to the login directory and silently fail on a leading slash.
|
||||
*
|
||||
* @return array{0:string,1:?string} the directory form that worked, and the marker bytes (null if none did)
|
||||
*/
|
||||
private function readRemoteMarker(SFTP $sftp, string $configuredPath): array
|
||||
{
|
||||
$candidates = $this->remoteDirCandidates($configuredPath);
|
||||
|
||||
foreach ($candidates as $dir) {
|
||||
try {
|
||||
$contents = $sftp->get($this->joinRemote($dir, self::MARKER_FILE));
|
||||
} catch (\Throwable $e) {
|
||||
throw new SftpImportException(
|
||||
'Failed to read remote ' . self::MARKER_FILE . ': ' . $e->getMessage(),
|
||||
0,
|
||||
$e
|
||||
);
|
||||
}
|
||||
|
||||
if ($contents !== false) {
|
||||
return [$dir, (string)$contents];
|
||||
}
|
||||
}
|
||||
|
||||
return [$candidates[0], null];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[] non-empty, unique
|
||||
*/
|
||||
private function remoteDirCandidates(string $configuredPath): array
|
||||
{
|
||||
$configured = trim($configuredPath);
|
||||
$relative = ltrim($configured, '/');
|
||||
|
||||
$candidates = [];
|
||||
if ($configured !== '' && $configured !== '/') {
|
||||
$candidates[] = $configured;
|
||||
}
|
||||
if ($relative !== '' && $relative !== $configured) {
|
||||
$candidates[] = $relative;
|
||||
}
|
||||
$candidates[] = '.';
|
||||
|
||||
return array_values(array_unique($candidates));
|
||||
}
|
||||
|
||||
/**
|
||||
* Download Ziel_*.xml + zustiege.xml + uebertragung.info into a fresh temp dir,
|
||||
* verifying each file's size against the remote listing. The marker is written
|
||||
* last, from the bytes already fetched for the freshness check.
|
||||
*
|
||||
* @throws SftpImportException
|
||||
*/
|
||||
private function downloadInto(SFTP $sftp, string $remotePath, string $markerBytes): string
|
||||
{
|
||||
$list = $sftp->rawlist($remotePath, false);
|
||||
if ($list === false) {
|
||||
throw new SftpImportException('Cannot list remote directory ' . $remotePath);
|
||||
}
|
||||
|
||||
$productFiles = [];
|
||||
$pickupSize = null;
|
||||
foreach ($list as $name => $attrs) {
|
||||
if ($name === '.' || $name === '..' || !is_array($attrs)) {
|
||||
continue;
|
||||
}
|
||||
if ((int)($attrs['type'] ?? 0) === self::REMOTE_TYPE_DIRECTORY) {
|
||||
continue;
|
||||
}
|
||||
if (strpos($name, self::PRODUCT_PREFIX) === 0 && substr($name, -4) === '.xml') {
|
||||
$productFiles[$name] = (int)($attrs['size'] ?? -1);
|
||||
} elseif ($name === self::PICKUPS_FILE) {
|
||||
$pickupSize = (int)($attrs['size'] ?? -1);
|
||||
}
|
||||
}
|
||||
|
||||
if (count($productFiles) === 0) {
|
||||
throw new SftpImportException('Remote export contains no ' . self::PRODUCT_PREFIX . '_*.xml files');
|
||||
}
|
||||
|
||||
$previousCount = $this->stagedProductFileCount();
|
||||
if ($previousCount > 0 && count($productFiles) < (int)floor($previousCount * 0.5)) {
|
||||
throw new SftpImportException(sprintf(
|
||||
'Remote export looks truncated (%d %s_*.xml files vs %d previously) — refusing to import',
|
||||
count($productFiles),
|
||||
self::PRODUCT_PREFIX,
|
||||
$previousCount
|
||||
));
|
||||
}
|
||||
|
||||
$toDownload = $productFiles;
|
||||
if ($pickupSize !== null) {
|
||||
$toDownload[self::PICKUPS_FILE] = $pickupSize;
|
||||
} else {
|
||||
$this->logWarning('remote export has no ' . self::PICKUPS_FILE . '; pickups will be skipped');
|
||||
}
|
||||
|
||||
$tmp = $this->newTempDir();
|
||||
|
||||
foreach ($toDownload as $name => $expectedSize) {
|
||||
$target = $tmp . '/' . $name;
|
||||
try {
|
||||
$ok = $sftp->get($this->joinRemote($remotePath, $name), $target);
|
||||
} catch (\Throwable $e) {
|
||||
GeneralUtility::rmdir($tmp, true);
|
||||
throw new SftpImportException('Download failed for ' . $name . ': ' . $e->getMessage(), 0, $e);
|
||||
}
|
||||
|
||||
if ($ok === false || !is_file($target)) {
|
||||
GeneralUtility::rmdir($tmp, true);
|
||||
throw new SftpImportException('Download failed for ' . $name);
|
||||
}
|
||||
|
||||
clearstatcache(true, $target);
|
||||
if ($expectedSize >= 0 && filesize($target) !== $expectedSize) {
|
||||
$actualSize = filesize($target);
|
||||
GeneralUtility::rmdir($tmp, true);
|
||||
throw new SftpImportException(sprintf(
|
||||
'Size mismatch for %s (got %d bytes, expected %d)',
|
||||
$name,
|
||||
$actualSize,
|
||||
$expectedSize
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
// Write the completion marker last, mirroring the supplier's upload order.
|
||||
GeneralUtility::writeFile($tmp . '/' . self::MARKER_FILE, $markerBytes, false);
|
||||
|
||||
return $tmp;
|
||||
}
|
||||
|
||||
private function stagedProductFileCount(): int
|
||||
{
|
||||
$dir = $this->stagingBasePath() . '/' . self::PUBLISHED_DIR;
|
||||
if (!is_dir($dir)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
$count = 0;
|
||||
foreach ((array)scandir($dir) as $name) {
|
||||
if (strpos((string)$name, self::PRODUCT_PREFIX) === 0 && substr((string)$name, -4) === '.xml') {
|
||||
$count++;
|
||||
}
|
||||
}
|
||||
|
||||
return $count;
|
||||
}
|
||||
|
||||
private function parseMarkerTimestamp(string $contents): ?\DateTime
|
||||
{
|
||||
$line = trim((string)strtok($contents, "\r\n"));
|
||||
if ($line === '') {
|
||||
return null;
|
||||
}
|
||||
|
||||
$date = \DateTime::createFromFormat(self::MARKER_TS_FORMAT, $line);
|
||||
|
||||
return $date instanceof \DateTime ? $date : null;
|
||||
}
|
||||
|
||||
private function logWarning(string $message, array $context = []): void
|
||||
{
|
||||
if ($this->logger !== null) {
|
||||
$this->logger->warning($message, $context);
|
||||
}
|
||||
}
|
||||
|
||||
private function stagingBasePath(): string
|
||||
{
|
||||
return Environment::getVarPath() . '/transient/' . self::STAGING_SUBDIR;
|
||||
}
|
||||
|
||||
private function newTempDir(): string
|
||||
{
|
||||
$dir = $this->stagingBasePath() . '/.tmp-' . getmypid() . '-' . bin2hex(random_bytes(4));
|
||||
GeneralUtility::mkdir_deep($dir);
|
||||
if (!is_dir($dir) || !is_writable($dir)) {
|
||||
throw new SftpImportException('Cannot create staging directory: ' . $dir);
|
||||
}
|
||||
|
||||
return $dir;
|
||||
}
|
||||
|
||||
private function cleanupStale(): void
|
||||
{
|
||||
$base = $this->stagingBasePath();
|
||||
if (!is_dir($base)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$stale = array_merge(
|
||||
(array)glob($base . '/.tmp-*', GLOB_ONLYDIR),
|
||||
(array)glob($base . '/' . self::PUBLISHED_DIR . '.old-*', GLOB_ONLYDIR)
|
||||
);
|
||||
foreach ($stale as $dir) {
|
||||
GeneralUtility::rmdir($dir, true);
|
||||
}
|
||||
}
|
||||
|
||||
private function joinRemote(string $base, string $name): string
|
||||
{
|
||||
return rtrim($base, '/') . '/' . ltrim($name, '/');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array{host:string,port:int,user:string,password:string,remotePath:string,timeout:int,hostKey:string}
|
||||
*/
|
||||
private function buildConfig(): array
|
||||
{
|
||||
if ($this->configuration === null) {
|
||||
$raw = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get('ep_products');
|
||||
$raw = is_array($raw) ? $raw : [];
|
||||
|
||||
$host = trim((string)($raw['productImportSftpHost'] ?? ''));
|
||||
$user = trim((string)($raw['productImportSftpUser'] ?? ''));
|
||||
$password = (string)($raw['productImportSftpPassword'] ?? '');
|
||||
$remotePath = trim((string)($raw['productImportSftpRemotePath'] ?? '/'));
|
||||
$port = (int)($raw['productImportSftpPort'] ?? 22);
|
||||
$timeout = (int)($raw['productImportSftpTimeout'] ?? 15);
|
||||
$hostKey = trim((string)($raw['productImportSftpHostKey'] ?? ''));
|
||||
|
||||
if ($host === '' || $user === '') {
|
||||
throw new SftpImportException(
|
||||
'SFTP product import is not configured: host and username are required '
|
||||
. '(Admin Tools → Settings → Extension Configuration → ep_products).'
|
||||
);
|
||||
}
|
||||
if ($password === '') {
|
||||
throw new SftpImportException('SFTP product import is not configured: password is required.');
|
||||
}
|
||||
|
||||
$this->configuration = [
|
||||
'host' => $host,
|
||||
'port' => $port > 0 ? $port : 22,
|
||||
'user' => $user,
|
||||
'password' => $password,
|
||||
'remotePath' => $remotePath === '' ? '/' : $remotePath,
|
||||
'timeout' => $timeout > 0 ? $timeout : 15,
|
||||
'hostKey' => $hostKey,
|
||||
];
|
||||
}
|
||||
|
||||
return $this->configuration;
|
||||
}
|
||||
}
|
||||
@@ -33,7 +33,10 @@ use EP\EpProducts\Domain\Repository\RegionRepository;
|
||||
use EP\EpProducts\Domain\Repository\SnowreportRepository;
|
||||
use EP\EpProducts\Domain\Repository\WebcamRepository;
|
||||
use EP\EpProducts\Utility\SettingsUtility;
|
||||
use TYPO3\CMS\Core\Database\Connection;
|
||||
use TYPO3\CMS\Core\Database\ConnectionPool;
|
||||
use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction;
|
||||
use TYPO3\CMS\Core\Http\RequestFactory;
|
||||
use TYPO3\CMS\Core\SingletonInterface;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface;
|
||||
@@ -44,14 +47,34 @@ class SnowreportImportService implements SingletonInterface
|
||||
const XML_FILE_URL = 'https://www.skiresort-service.com/xml-feed/';
|
||||
|
||||
/**
|
||||
* @var array
|
||||
* Connection and read timeout for the feed download, in seconds. A healthy response to this
|
||||
* endpoint arrives in well under a second, so the ceiling is kept low enough that an outage on
|
||||
* the vendor side fails visibly instead of stalling the scheduler task or the backend request.
|
||||
*/
|
||||
protected static $validSnowreportUids = [];
|
||||
const HTTP_CONNECT_TIMEOUT = 5;
|
||||
const HTTP_TIMEOUT = 30;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected static $validWebcamUids = [];
|
||||
protected $validSnowreportUids = [];
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $validWebcamUids = [];
|
||||
|
||||
/**
|
||||
* Existing records keyed by vendor_uid, preloaded once per import to avoid a query per record.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $snowreportIndex = [];
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $webcamIndex = [];
|
||||
|
||||
/**
|
||||
* @var \TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager
|
||||
@@ -91,27 +114,62 @@ class SnowreportImportService implements SingletonInterface
|
||||
$this->regionRepository = $regionRepository;
|
||||
}
|
||||
|
||||
const TYPE_INT = 'int';
|
||||
const TYPE_STRING = 'string';
|
||||
const TYPE_BOOL = 'bool';
|
||||
const TYPE_DATE = 'date';
|
||||
|
||||
/**
|
||||
* Declared schema of the vendor feed: XML element name => target column and its type.
|
||||
*
|
||||
* XML carries no type information - every element is a string - so the type of each field is
|
||||
* declared here rather than guessed from the value. Values are converted strictly according to
|
||||
* this table; anything unexpected is logged and falls back to the type's empty value instead of
|
||||
* silently changing type.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected static $map = [
|
||||
'region_id' => 'vendor_uid',
|
||||
'region_name' => 'region_name',
|
||||
'region_offen' => 'opened',
|
||||
'gletschergebiet' => 'glacier',
|
||||
'schneehoehe_berg' => 'snow_level_mountain',
|
||||
'schneehoehe_tal' => 'snow_level_valley',
|
||||
'schneequalitaet' => 'snow_quality',
|
||||
'letzter_schneefall' => 'last_snowfall',
|
||||
'lifte_gesamt' => 'lifts_total',
|
||||
'offene_lifte' => 'lifts_opened',
|
||||
'letzte_aktualisierung' => 'last_update',
|
||||
'hoehemax' => 'height_max',
|
||||
'hoehemin' => 'height_min',
|
||||
'datum_saisonstart' => 'season_start',
|
||||
'datum_saisonende' => 'season_end',
|
||||
'region_id' => ['column' => 'vendor_uid', 'type' => self::TYPE_INT],
|
||||
'region_name' => ['column' => 'region_name', 'type' => self::TYPE_STRING],
|
||||
'region_offen' => ['column' => 'opened', 'type' => self::TYPE_BOOL],
|
||||
'gletschergebiet' => ['column' => 'glacier', 'type' => self::TYPE_BOOL],
|
||||
'schneehoehe_berg' => ['column' => 'snow_level_mountain', 'type' => self::TYPE_INT],
|
||||
'schneehoehe_tal' => ['column' => 'snow_level_valley', 'type' => self::TYPE_INT],
|
||||
'schneequalitaet' => ['column' => 'snow_quality', 'type' => self::TYPE_STRING],
|
||||
'letzter_schneefall' => ['column' => 'last_snowfall', 'type' => self::TYPE_DATE],
|
||||
'lifte_gesamt' => ['column' => 'lifts_total', 'type' => self::TYPE_INT],
|
||||
'offene_lifte' => ['column' => 'lifts_opened', 'type' => self::TYPE_INT],
|
||||
'letzte_aktualisierung' => ['column' => 'last_update', 'type' => self::TYPE_DATE],
|
||||
'hoehemax' => ['column' => 'height_max', 'type' => self::TYPE_INT],
|
||||
'hoehemin' => ['column' => 'height_min', 'type' => self::TYPE_INT],
|
||||
'datum_saisonstart' => ['column' => 'season_start', 'type' => self::TYPE_DATE],
|
||||
'datum_saisonende' => ['column' => 'season_end', 'type' => self::TYPE_DATE],
|
||||
];
|
||||
|
||||
/**
|
||||
* Accepted boolean representations, lowercased.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected static $booleanMap = [
|
||||
'true' => true,
|
||||
'1' => true,
|
||||
'ja' => true,
|
||||
'yes' => true,
|
||||
'false' => false,
|
||||
'0' => false,
|
||||
'nein' => false,
|
||||
'no' => false,
|
||||
];
|
||||
|
||||
/**
|
||||
* Distinct conversion problems encountered during the current import.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $conversionWarnings = [];
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
@@ -119,39 +177,41 @@ class SnowreportImportService implements SingletonInterface
|
||||
{
|
||||
$count = 0;
|
||||
$file = GeneralUtility::getFileAbsFileName(self::XML_FILE_PATH);
|
||||
$xmlContent = file_get_contents($file);
|
||||
$xmlData = simplexml_load_string($xmlContent);
|
||||
|
||||
if (!is_file($file)) {
|
||||
$this->writelog(sprintf('Snowreport XML import failed: file "%s" does not exist.', $file));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
try {
|
||||
$xmlData = $this->parseReportsXml((string) file_get_contents($file));
|
||||
} catch (\RuntimeException $e) {
|
||||
$this->writelog(sprintf('Snowreport XML import failed: %s', $e->getMessage()));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
$this->resetImportState();
|
||||
$this->buildIndexes();
|
||||
|
||||
$snowReportStoragePid = $this->getStoragePid();
|
||||
|
||||
foreach ($xmlData->schneemeldung as $reportXml)
|
||||
{
|
||||
$vendorUid = (int) $reportXml->region_id;
|
||||
$result = $this->snowreportRepository->findByVendorUid($vendorUid);
|
||||
if ($result->count() === 0) {
|
||||
$snowreport = new Snowreport();
|
||||
$this->snowreportRepository->add($snowreport);
|
||||
} else {
|
||||
$snowreport = $result->getFirst();
|
||||
}
|
||||
$snowreport = $this->getSnowreport($vendorUid);
|
||||
|
||||
$row = [];
|
||||
foreach (static::$map as $key => $column)
|
||||
foreach (static::$map as $key => $field)
|
||||
{
|
||||
$valueRaw = trim($reportXml->{$key});
|
||||
|
||||
if ($valueRaw === 'true') {
|
||||
$value = true;
|
||||
} elseif ($valueRaw === 'false') {
|
||||
$value = false;
|
||||
} elseif (preg_match('/^\d{4}\-\d{2}\-\d{2}$/', $valueRaw)) {
|
||||
$date = new \DateTime($valueRaw);
|
||||
$value = $date->getTimestamp();
|
||||
} else {
|
||||
$value = (string) $valueRaw;
|
||||
if (!isset($reportXml->{$key})) {
|
||||
$this->addConversionWarning(sprintf('Element <%s> missing in feed.', $key));
|
||||
$row[$field['column']] = $this->getEmptyValue($field['type']);
|
||||
continue;
|
||||
}
|
||||
|
||||
$row[$column] = $value;
|
||||
$row[$field['column']] = $this->convertValue((string) $reportXml->{$key}, $field['type'], $key);
|
||||
}
|
||||
|
||||
$snowreport->setPid($snowReportStoragePid);
|
||||
@@ -175,23 +235,24 @@ class SnowreportImportService implements SingletonInterface
|
||||
$this->importWebcamData($reportXml->webcam, $snowreport);
|
||||
}
|
||||
|
||||
if ($snowreport->_isNew()) {
|
||||
$this->persistenceManager->persistAll();
|
||||
} else {
|
||||
// New objects are already registered via add(); only managed ones need update().
|
||||
if (!$snowreport->_isNew()) {
|
||||
$this->snowreportRepository->update($snowreport);
|
||||
}
|
||||
|
||||
static::$validSnowreportUids[] = $vendorUid;
|
||||
$this->validSnowreportUids[] = $vendorUid;
|
||||
|
||||
$count++;
|
||||
}
|
||||
|
||||
$this->persistenceManager->persistAll();
|
||||
|
||||
$this->cleanupData('tx_epproducts_domain_model_webcam', static::$validWebcamUids);
|
||||
$this->cleanupData('tx_epproducts_domain_model_snowreport', static::$validSnowreportUids);
|
||||
$this->cleanupData('tx_epproducts_domain_model_webcam', $this->validWebcamUids);
|
||||
$this->cleanupData('tx_epproducts_domain_model_snowreport', $this->validSnowreportUids);
|
||||
$this->updateWebcamCounters();
|
||||
|
||||
$GLOBALS['BE_USER']->writelog(4, 0, 0, 0, sprintf('Snowreport XML import successful (%d records).', $count), []);
|
||||
$this->logConversionWarnings();
|
||||
$this->writelog(sprintf('Snowreport XML import successful (%d records).', $count));
|
||||
|
||||
return $count;
|
||||
}
|
||||
@@ -205,40 +266,52 @@ class SnowreportImportService implements SingletonInterface
|
||||
$snowReportStoragePid = $this->getStoragePid();
|
||||
foreach ($xml->children() as $item)
|
||||
{
|
||||
$include = (string) $item->aktuell === 'true';
|
||||
$available = (string) $item->verf === 'true';
|
||||
$include = $this->convertValue((string) $item->aktuell, self::TYPE_BOOL, 'aktuell');
|
||||
$available = $this->convertValue((string) $item->verf, self::TYPE_BOOL, 'verf');
|
||||
$vendorUid = (int) $item->uid;
|
||||
$result = $this->webcamRepository->findByVendorUid($vendorUid);
|
||||
// Skip invalid cams
|
||||
if ($include === false && $result->count() === 0) {
|
||||
|
||||
$webcam = isset($this->webcamIndex[$vendorUid]) ? $this->webcamIndex[$vendorUid] : null;
|
||||
|
||||
// Skip cams that are neither current nor already known
|
||||
if (null === $webcam && false === $include) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Add new cam if not in db yet
|
||||
if ($result->count() === 0) {
|
||||
if (null === $webcam) {
|
||||
$webcam = new Webcam();
|
||||
$webcam->setVendorUid($vendorUid);
|
||||
$webcam->setPid($snowReportStoragePid);
|
||||
$webcam->setUrl((string) $item->url);
|
||||
$webcam->setName((string) $item->dt);
|
||||
$webcam->setAvailable($available);
|
||||
$this->webcamRepository->add($webcam);
|
||||
$this->webcamIndex[$vendorUid] = $webcam;
|
||||
$snowreport->addWebcam($webcam);
|
||||
} else {
|
||||
// Update cam in db and set availability
|
||||
$webcam = $result->getFirst();
|
||||
$webcam->setUrl((string) $item->url);
|
||||
$webcam->setName((string) $item->dt);
|
||||
$webcam->setAvailable($available && $include);
|
||||
}
|
||||
static::$validWebcamUids[] = $vendorUid;
|
||||
|
||||
$webcam->setUrl((string) $item->url);
|
||||
$webcam->setName((string) $item->dt);
|
||||
$webcam->setAvailable($available && $include);
|
||||
|
||||
$this->validWebcamUids[] = $vendorUid;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Flags records that are no longer contained in the feed as deleted.
|
||||
*
|
||||
* @param string $table
|
||||
* @param array $validUids
|
||||
* @return int Number of records flagged
|
||||
*/
|
||||
public function cleanupData($table, array $validUids)
|
||||
{
|
||||
/** @var ConnectionPool $connectionPool */
|
||||
$connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
|
||||
$qb = $connectionPool->getQueryBuilderForTable($table);
|
||||
// Hidden records are still managed by the import, only deleted ones are out of scope.
|
||||
$qb->getRestrictions()
|
||||
->removeAll()
|
||||
->add(GeneralUtility::makeInstance(DeletedRestriction::class))
|
||||
;
|
||||
$result = $qb
|
||||
->select('vendor_uid')
|
||||
->from($table)
|
||||
@@ -250,36 +323,293 @@ class SnowreportImportService implements SingletonInterface
|
||||
return (int)$row['vendor_uid'];
|
||||
}, $result);
|
||||
|
||||
$obsoleteUids = array_diff($currentUids, $validUids);
|
||||
$obsoleteUids = array_values(array_diff($currentUids, $validUids));
|
||||
if (0 === count($obsoleteUids)) {
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
|
||||
$qb = $connectionPool->getQueryBuilderForTable($table);
|
||||
$qb
|
||||
->delete($table)
|
||||
->where($qb->expr()->in('vendor_uid', $obsoleteUids))
|
||||
|
||||
return (int) $qb
|
||||
->update($table)
|
||||
->set('deleted', 1)
|
||||
->set('tstamp', isset($GLOBALS['EXEC_TIME']) ? $GLOBALS['EXEC_TIME'] : time())
|
||||
->where(
|
||||
$qb->expr()->in(
|
||||
'vendor_uid',
|
||||
$qb->createNamedParameter($obsoleteUids, Connection::PARAM_INT_ARRAY)
|
||||
)
|
||||
)
|
||||
->execute()
|
||||
;
|
||||
}
|
||||
|
||||
/**
|
||||
* Recalculates the inline child counter on the snowreport records. Webcams are flagged as deleted
|
||||
* with plain SQL, which bypasses the counter Extbase maintains for the relation.
|
||||
*/
|
||||
protected function updateWebcamCounters()
|
||||
{
|
||||
$connection = GeneralUtility::makeInstance(ConnectionPool::class)
|
||||
->getConnectionForTable('tx_epproducts_domain_model_snowreport');
|
||||
|
||||
$connection->executeStatement(
|
||||
'UPDATE tx_epproducts_domain_model_snowreport s SET s.webcams = ('
|
||||
. ' SELECT COUNT(*) FROM tx_epproducts_domain_model_webcam w'
|
||||
. ' WHERE w.snowreport = s.uid AND w.deleted = 0'
|
||||
. ')'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Downloads the feed and replaces the local file only if the response is a usable XML document.
|
||||
* The existing file is left untouched on any failure.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function downloadReportsXml()
|
||||
{
|
||||
$path = GeneralUtility::getFileAbsFileName(self::XML_FILE_PATH);
|
||||
$backupPath = $path . '.bak';
|
||||
|
||||
@copy($path, $backupPath);
|
||||
@unlink($path);
|
||||
try {
|
||||
$xmlContent = $this->fetchReportsXml();
|
||||
$this->parseReportsXml($xmlContent);
|
||||
} catch (\Exception $e) {
|
||||
$this->writelog(sprintf(
|
||||
'Snowreport XML download failed (%s). Keeping existing file.',
|
||||
$e->getMessage()
|
||||
));
|
||||
|
||||
$url = self::XML_FILE_URL;
|
||||
exec("wget -O {$path} {$url}", $output, $return);
|
||||
if (!$return) {
|
||||
@unlink($backupPath);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Write to a temporary file first and move it into place, so the feed is either the old or the
|
||||
// new document, never a partially written one.
|
||||
$temporaryPath = $path . '.tmp';
|
||||
if (false === file_put_contents($temporaryPath, $xmlContent) || !rename($temporaryPath, $path)) {
|
||||
@unlink($temporaryPath);
|
||||
$this->writelog(sprintf('Snowreport XML could not be written to "%s".', $path));
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
* @throws \RuntimeException
|
||||
*/
|
||||
protected function fetchReportsXml()
|
||||
{
|
||||
/** @var RequestFactory $requestFactory */
|
||||
$requestFactory = GeneralUtility::makeInstance(RequestFactory::class);
|
||||
|
||||
$response = $requestFactory->request(self::XML_FILE_URL, 'GET', [
|
||||
'connect_timeout' => self::HTTP_CONNECT_TIMEOUT,
|
||||
'timeout' => self::HTTP_TIMEOUT,
|
||||
'headers' => [
|
||||
'Accept' => 'application/xml, text/xml',
|
||||
],
|
||||
]);
|
||||
|
||||
if (200 !== $response->getStatusCode()) {
|
||||
throw new \RuntimeException(
|
||||
sprintf('unexpected status code %d', $response->getStatusCode()),
|
||||
1758000001
|
||||
);
|
||||
}
|
||||
|
||||
return (string) $response->getBody();
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses the feed and rejects documents that are unusable. Without this an empty or truncated
|
||||
* response would be imported as an empty feed, and the cleanup would flag every record as deleted.
|
||||
*
|
||||
* @param string $xmlContent
|
||||
* @return \SimpleXMLElement
|
||||
* @throws \RuntimeException
|
||||
*/
|
||||
protected function parseReportsXml($xmlContent)
|
||||
{
|
||||
if ('' === trim($xmlContent)) {
|
||||
throw new \RuntimeException('response is empty', 1758000002);
|
||||
}
|
||||
|
||||
$useInternalErrors = libxml_use_internal_errors(true);
|
||||
libxml_clear_errors();
|
||||
$xmlData = simplexml_load_string($xmlContent);
|
||||
$errors = libxml_get_errors();
|
||||
libxml_clear_errors();
|
||||
libxml_use_internal_errors($useInternalErrors);
|
||||
|
||||
if (false === $xmlData) {
|
||||
$message = count($errors) > 0 ? trim($errors[0]->message) : 'unknown error';
|
||||
throw new \RuntimeException(sprintf('response is not valid XML (%s)', $message), 1758000003);
|
||||
}
|
||||
|
||||
if (0 === $xmlData->schneemeldung->count()) {
|
||||
throw new \RuntimeException('response contains no <schneemeldung> elements', 1758000004);
|
||||
}
|
||||
|
||||
return $xmlData;
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads existing records once, keyed by vendor_uid. Replaces a repository lookup per feed record.
|
||||
*/
|
||||
protected function buildIndexes()
|
||||
{
|
||||
$this->snowreportIndex = [];
|
||||
foreach ($this->snowreportRepository->findAll() as $snowreport) {
|
||||
$this->snowreportIndex[(int) $snowreport->getVendorUid()] = $snowreport;
|
||||
}
|
||||
|
||||
$this->webcamIndex = [];
|
||||
foreach ($this->webcamRepository->findAll() as $webcam) {
|
||||
$this->webcamIndex[(int) $webcam->getVendorUid()] = $webcam;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $vendorUid
|
||||
* @return Snowreport
|
||||
*/
|
||||
protected function getSnowreport($vendorUid)
|
||||
{
|
||||
if (isset($this->snowreportIndex[$vendorUid])) {
|
||||
return $this->snowreportIndex[$vendorUid];
|
||||
}
|
||||
|
||||
$snowreport = new Snowreport();
|
||||
$snowreport->setVendorUid($vendorUid);
|
||||
$this->snowreportRepository->add($snowreport);
|
||||
$this->snowreportIndex[$vendorUid] = $snowreport;
|
||||
|
||||
return $snowreport;
|
||||
}
|
||||
|
||||
/**
|
||||
* The service is a singleton, so per-import state must not survive into the next run.
|
||||
*/
|
||||
protected function resetImportState()
|
||||
{
|
||||
$this->validSnowreportUids = [];
|
||||
$this->validWebcamUids = [];
|
||||
$this->conversionWarnings = [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a raw XML string to the declared type of the field.
|
||||
*
|
||||
* @param string $raw
|
||||
* @param string $type
|
||||
* @param string $key XML element name, for logging
|
||||
* @return int|string|bool
|
||||
*/
|
||||
protected function convertValue($raw, $type, $key)
|
||||
{
|
||||
$raw = trim($raw);
|
||||
|
||||
// The feed delivers empty elements for data that is not available yet (snow levels out of
|
||||
// season, for example). That is expected, not an error.
|
||||
if ($raw === '') {
|
||||
return $this->getEmptyValue($type);
|
||||
}
|
||||
|
||||
switch ($type) {
|
||||
case self::TYPE_STRING:
|
||||
return $raw;
|
||||
|
||||
case self::TYPE_INT:
|
||||
if (!preg_match('/^-?\d+$/', $raw)) {
|
||||
$this->addConversionWarning(sprintf('<%s> expected an integer, got "%s".', $key, $raw));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
return (int) $raw;
|
||||
|
||||
case self::TYPE_BOOL:
|
||||
$normalized = strtolower($raw);
|
||||
if (!array_key_exists($normalized, static::$booleanMap)) {
|
||||
$this->addConversionWarning(sprintf('<%s> expected a boolean, got "%s".', $key, $raw));
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return static::$booleanMap[$normalized];
|
||||
|
||||
case self::TYPE_DATE:
|
||||
if (!preg_match('/^\d{4}-\d{2}-\d{2}([ T]\d{2}:\d{2}(:\d{2})?)?$/', $raw)) {
|
||||
$this->addConversionWarning(sprintf('<%s> expected a date, got "%s".', $key, $raw));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
$date = new \DateTime($raw);
|
||||
|
||||
return $date->getTimestamp();
|
||||
}
|
||||
|
||||
throw new \InvalidArgumentException(sprintf('Unknown field type "%s" declared for <%s>.', $type, $key), 1758000000);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $type
|
||||
* @return int|string|bool
|
||||
*/
|
||||
protected function getEmptyValue($type)
|
||||
{
|
||||
if ($type === self::TYPE_STRING) {
|
||||
return '';
|
||||
}
|
||||
if ($type === self::TYPE_BOOL) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $message
|
||||
*/
|
||||
protected function addConversionWarning($message)
|
||||
{
|
||||
// Keyed to keep one entry per distinct problem instead of one per record.
|
||||
$this->conversionWarnings[$message] = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes a single summary entry to the log if the feed contained unexpected values.
|
||||
*/
|
||||
protected function logConversionWarnings()
|
||||
{
|
||||
if (0 === count($this->conversionWarnings)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$GLOBALS['BE_USER']->writelog(4, 0, 0, 0, 'Snowreport XML download failed. Keeping existing file.', []);
|
||||
@rename($backupPath, $path);
|
||||
$messages = array_keys($this->conversionWarnings);
|
||||
$this->writelog(sprintf(
|
||||
'Snowreport XML import: %d unexpected value(s) in feed: %s',
|
||||
count($messages),
|
||||
implode(' | ', array_slice($messages, 0, 10))
|
||||
));
|
||||
|
||||
$this->conversionWarnings = [];
|
||||
}
|
||||
|
||||
/**
|
||||
* The scheduler task and the backend module provide a backend user, the CLI command does not.
|
||||
*
|
||||
* @param string $message
|
||||
*/
|
||||
protected function writelog($message)
|
||||
{
|
||||
if (isset($GLOBALS['BE_USER']) && is_object($GLOBALS['BE_USER'])) {
|
||||
$GLOBALS['BE_USER']->writelog(4, 0, 0, 0, $message, []);
|
||||
}
|
||||
}
|
||||
|
||||
public function getStoragePid()
|
||||
|
||||
@@ -28,6 +28,7 @@ namespace EP\EpProducts\Task;
|
||||
***************************************************************/
|
||||
|
||||
use EP\EpProducts\Service\DateImportService;
|
||||
use EP\EpProducts\Service\ProductImportSourceFactory;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Extbase\Configuration\ConfigurationManager;
|
||||
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
|
||||
@@ -39,11 +40,20 @@ class ImportDatesTask extends AbstractTask
|
||||
public function execute(): bool
|
||||
{
|
||||
$importService = GeneralUtility::makeInstance(DateImportService::class);
|
||||
$importSource = GeneralUtility::makeInstance(ProductImportSourceFactory::class)->get();
|
||||
$cacheService = GeneralUtility::makeInstance(CacheService::class);
|
||||
|
||||
if ($importService->isImportRequired()) {
|
||||
$path = GeneralUtility::getFileAbsFileName('fileadmin/xmlexport');
|
||||
// Acquire the export only when it is newer than the one we last imported
|
||||
// (SFTP mode: download to a staging dir; local mode: fileadmin/xmlexport).
|
||||
// An acquisition failure (SFTP connect/auth/transfer) is left to propagate
|
||||
// so the scheduler marks the task failed.
|
||||
$path = $importSource->acquire();
|
||||
|
||||
if ($path !== null) {
|
||||
$importService->import($path);
|
||||
// Advance the "last imported" bookkeeping only after a successful
|
||||
// import, so a crashed import retries on the next run.
|
||||
$importSource->markImported($path);
|
||||
}
|
||||
|
||||
$settings = $this->getSettings();
|
||||
|
||||
+4
-1
@@ -4,6 +4,7 @@ return [
|
||||
'title' => 'LLL:EXT:ep_products/Resources/Private/Language/locallang.xlf:tx_epproducts_domain_model_badge',
|
||||
'default_sortby' => 'ORDER BY title',
|
||||
'label' => 'title',
|
||||
'prependAtCopy' => '[COPY %s]',
|
||||
'tstamp' => 'tstamp',
|
||||
'crdate' => 'crdate',
|
||||
'cruser_id' => 'cruser_id',
|
||||
@@ -18,7 +19,7 @@ return [
|
||||
'starttime' => 'starttime',
|
||||
'endtime' => 'endtime',
|
||||
],
|
||||
'searchFields' => 'headline,subline',
|
||||
'searchFields' => 'title,subtitle',
|
||||
'iconfile' => 'EXT:ep_theme/Resources/Public/images/icon_ce.svg',
|
||||
],
|
||||
'types' => [
|
||||
@@ -35,6 +36,7 @@ return [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'sys_language',
|
||||
'foreign_table_where' => 'ORDER BY sys_language.title',
|
||||
@@ -49,6 +51,7 @@ return [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'items' => [
|
||||
['', 0],
|
||||
|
||||
@@ -4,6 +4,7 @@ return [
|
||||
'title' => 'LLL:EXT:ep_products/Resources/Private/Language/locallang.xlf:tx_epproducts_domain_model_city',
|
||||
'default_sortby' => 'ORDER BY name',
|
||||
'label' => 'name_internal',
|
||||
'prependAtCopy' => '[COPY %s]',
|
||||
'tstamp' => 'tstamp',
|
||||
'crdate' => 'crdate',
|
||||
'cruser_id' => 'cruser_id',
|
||||
@@ -40,6 +41,7 @@ return [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'sys_language',
|
||||
'foreign_table_where' => 'ORDER BY sys_language.title',
|
||||
@@ -54,6 +56,7 @@ return [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'items' => [
|
||||
['', 0],
|
||||
@@ -405,6 +408,7 @@ return [
|
||||
'label' => 'Land',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'tx_epproducts_domain_model_country',
|
||||
'minitems' => 1,
|
||||
@@ -416,6 +420,7 @@ return [
|
||||
'label' => 'Gebiet',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'tx_epproducts_domain_model_region',
|
||||
'minitems' => 1,
|
||||
@@ -427,6 +432,7 @@ return [
|
||||
'label' => 'Officetipp',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'tx_epproducts_domain_model_officetip',
|
||||
'items' => [
|
||||
|
||||
+3
@@ -5,6 +5,7 @@ return [
|
||||
'default_sortby' => 'ORDER BY name',
|
||||
'sortby' => 'sorting',
|
||||
'label' => 'name',
|
||||
'prependAtCopy' => '[COPY %s]',
|
||||
'tstamp' => 'tstamp',
|
||||
'crdate' => 'crdate',
|
||||
'cruser_id' => 'cruser_id',
|
||||
@@ -43,6 +44,7 @@ return [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'sys_language',
|
||||
'foreign_table_where' => 'ORDER BY sys_language.title',
|
||||
@@ -57,6 +59,7 @@ return [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'items' => [
|
||||
['', 0],
|
||||
|
||||
+4
-1
@@ -20,7 +20,7 @@ return [
|
||||
'starttime' => 'starttime',
|
||||
'endtime' => 'endtime',
|
||||
],
|
||||
'searchFields' => 'code',
|
||||
'searchFields' => 'room_code,room_label',
|
||||
'iconfile' => 'EXT:ep_theme/Resources/Public/images/icon_ce.svg',
|
||||
],
|
||||
'types' => [
|
||||
@@ -34,6 +34,7 @@ return [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'sys_language',
|
||||
'foreign_table_where' => 'ORDER BY sys_language.title',
|
||||
@@ -48,6 +49,7 @@ return [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'items' => [
|
||||
['', 0],
|
||||
@@ -145,6 +147,7 @@ return [
|
||||
'label' => 'Unterkunft',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'tx_epproducts_domain_model_hotel',
|
||||
'minitems' => 1,
|
||||
|
||||
+5
@@ -3,6 +3,7 @@ return [
|
||||
'ctrl' => [
|
||||
'title' => 'LLL:EXT:ep_products/Resources/Private/Language/locallang.xlf:tx_epproducts_domain_model_country',
|
||||
'label' => 'name_internal',
|
||||
'prependAtCopy' => '[COPY %s]',
|
||||
'default_sortby' => 'ORDER BY name_internal',
|
||||
'tstamp' => 'tstamp',
|
||||
'crdate' => 'crdate',
|
||||
@@ -42,6 +43,7 @@ return [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'sys_language',
|
||||
'foreign_table_where' => 'ORDER BY sys_language.title',
|
||||
@@ -56,6 +58,7 @@ return [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'items' => [
|
||||
['', 0],
|
||||
@@ -387,6 +390,7 @@ return [
|
||||
'label' => 'Officetipp',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'tx_epproducts_domain_model_officetip',
|
||||
'items' => [
|
||||
@@ -401,6 +405,7 @@ return [
|
||||
'label' => 'Gebiet für Schneehöhen',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'items' => [
|
||||
['Keine Zuordnung', 0]
|
||||
],
|
||||
|
||||
+53
@@ -38,6 +38,7 @@ return [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'sys_language',
|
||||
'foreign_table_where' => 'ORDER BY sys_language.title',
|
||||
@@ -52,6 +53,7 @@ return [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'items' => [
|
||||
['', 0],
|
||||
@@ -142,6 +144,57 @@ return [
|
||||
'type' => 'passthrough',
|
||||
],
|
||||
],
|
||||
// Denormalized columns written by DateImportService, which rebuilds this table
|
||||
// wholesale. They are TEXT NOT NULL, and MySQL cannot default that, so without a
|
||||
// TCA entry DataHandler omits them and every INSERT fails under STRICT_TRANS_TABLES.
|
||||
'product_keywords' => [
|
||||
'exclude' => true,
|
||||
'config' => [
|
||||
'type' => 'passthrough',
|
||||
],
|
||||
],
|
||||
'product_teaser' => [
|
||||
'exclude' => true,
|
||||
'config' => [
|
||||
'type' => 'passthrough',
|
||||
],
|
||||
],
|
||||
'concept_popup_text' => [
|
||||
'exclude' => true,
|
||||
'config' => [
|
||||
'type' => 'passthrough',
|
||||
],
|
||||
],
|
||||
'country_keywords' => [
|
||||
'exclude' => true,
|
||||
'config' => [
|
||||
'type' => 'passthrough',
|
||||
],
|
||||
],
|
||||
'region_keywords' => [
|
||||
'exclude' => true,
|
||||
'config' => [
|
||||
'type' => 'passthrough',
|
||||
],
|
||||
],
|
||||
'city_keywords' => [
|
||||
'exclude' => true,
|
||||
'config' => [
|
||||
'type' => 'passthrough',
|
||||
],
|
||||
],
|
||||
'hotel_keywords' => [
|
||||
'exclude' => true,
|
||||
'config' => [
|
||||
'type' => 'passthrough',
|
||||
],
|
||||
],
|
||||
'hotel_teaser' => [
|
||||
'exclude' => true,
|
||||
'config' => [
|
||||
'type' => 'passthrough',
|
||||
],
|
||||
],
|
||||
'bus_pro_id' => [
|
||||
'exclude' => false,
|
||||
'label' => 'BusPro ID',
|
||||
|
||||
+4
-1
@@ -3,6 +3,7 @@ return [
|
||||
'ctrl' => [
|
||||
'title' => 'LLL:EXT:ep_products/Resources/Private/Language/locallang.xlf:tx_epproducts_domain_model_fact',
|
||||
'label' => 'label',
|
||||
'prependAtCopy' => '[COPY %s]',
|
||||
'default_sortby' => 'ORDER BY label',
|
||||
'tstamp' => 'tstamp',
|
||||
'crdate' => 'crdate',
|
||||
@@ -18,7 +19,7 @@ return [
|
||||
'starttime' => 'starttime',
|
||||
'endtime' => 'endtime',
|
||||
],
|
||||
'searchFields' => 'name,tags,',
|
||||
'searchFields' => 'name,label,keywords',
|
||||
'iconfile' => 'EXT:ep_theme/Resources/Public/images/icon_ce.svg',
|
||||
],
|
||||
'types' => [
|
||||
@@ -34,6 +35,7 @@ return [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'sys_language',
|
||||
'foreign_table_where' => 'ORDER BY sys_language.title',
|
||||
@@ -48,6 +50,7 @@ return [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'items' => [
|
||||
['', 0],
|
||||
|
||||
@@ -3,6 +3,7 @@ return [
|
||||
'ctrl' => [
|
||||
'title' => 'LLL:EXT:ep_products/Resources/Private/Language/locallang.xlf:tx_epproducts_domain_model_faq',
|
||||
'label' => 'label',
|
||||
'prependAtCopy' => '[COPY %s]',
|
||||
'tstamp' => 'tstamp',
|
||||
'crdate' => 'crdate',
|
||||
'cruser_id' => 'cruser_id',
|
||||
@@ -35,6 +36,7 @@ return [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'sys_language',
|
||||
'foreign_table_where' => 'ORDER BY sys_language.title',
|
||||
@@ -49,6 +51,7 @@ return [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'items' => [
|
||||
['', 0],
|
||||
|
||||
+2
@@ -5,6 +5,7 @@ return [
|
||||
'default_sortby' => 'ORDER BY price',
|
||||
'sortby' => 'sorting',
|
||||
'label' => 'title',
|
||||
'prependAtCopy' => '[COPY %s]',
|
||||
'tstamp' => 'tstamp',
|
||||
'crdate' => 'crdate',
|
||||
'cruser_id' => 'cruser_id',
|
||||
@@ -52,6 +53,7 @@ return [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'items' => [
|
||||
['', 0],
|
||||
|
||||
+1
@@ -55,6 +55,7 @@ return [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'items' => [
|
||||
['', 0],
|
||||
|
||||
+2
@@ -5,6 +5,7 @@ return [
|
||||
'default_sortby' => 'ORDER BY price',
|
||||
'sortby' => 'sorting',
|
||||
'label' => 'title',
|
||||
'prependAtCopy' => '[COPY %s]',
|
||||
'tstamp' => 'tstamp',
|
||||
'crdate' => 'crdate',
|
||||
'cruser_id' => 'cruser_id',
|
||||
@@ -53,6 +54,7 @@ return [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'items' => [
|
||||
['', 0],
|
||||
|
||||
+6
@@ -4,6 +4,7 @@ return [
|
||||
'title' => 'LLL:EXT:ep_products/Resources/Private/Language/locallang.xlf:tx_epproducts_domain_model_hotel',
|
||||
'default_sortby' => 'ORDER BY name',
|
||||
'label' => 'name',
|
||||
'prependAtCopy' => '[COPY %s]',
|
||||
'label_userFunc' => \EP\EpProducts\Service\LabelService::class . '->getHotelLabel',
|
||||
'tstamp' => 'tstamp',
|
||||
'crdate' => 'crdate',
|
||||
@@ -51,6 +52,7 @@ return [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'sys_language',
|
||||
'foreign_table_where' => 'ORDER BY sys_language.title',
|
||||
@@ -65,6 +67,7 @@ return [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'items' => [
|
||||
['', 0],
|
||||
@@ -488,6 +491,7 @@ return [
|
||||
'label' => 'Land',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'tx_epproducts_domain_model_country',
|
||||
'minitems' => 1,
|
||||
@@ -499,6 +503,7 @@ return [
|
||||
'label' => 'Gebiet',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'tx_epproducts_domain_model_region',
|
||||
'minitems' => 1,
|
||||
@@ -510,6 +515,7 @@ return [
|
||||
'label' => 'Ort',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'tx_epproducts_domain_model_city',
|
||||
'minitems' => 1,
|
||||
|
||||
+4
-2
@@ -49,12 +49,13 @@ return [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'items' => [
|
||||
['', 0],
|
||||
],
|
||||
'foreign_table' => 'tx_epproducts_domain_model_infobox',
|
||||
'foreign_table_where' => 'AND tx_epproducts_domain_model_infobox.pid=###CURRENT_PID### AND tx_epproducts_domain_model_infobox.sys_language_uid IN (-1,0)',
|
||||
'foreign_table' => 'tx_epproducts_domain_model_hotel_mapping',
|
||||
'foreign_table_where' => 'AND tx_epproducts_domain_model_hotel_mapping.pid=###CURRENT_PID### AND tx_epproducts_domain_model_hotel_mapping.sys_language_uid IN (-1,0)',
|
||||
],
|
||||
],
|
||||
'l10n_diffsource' => [
|
||||
@@ -114,6 +115,7 @@ return [
|
||||
'label' => 'Produkt',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'tx_epproducts_domain_model_product',
|
||||
'minitems' => 1,
|
||||
|
||||
+3
-1
@@ -4,6 +4,7 @@ return [
|
||||
'title' => 'LLL:EXT:ep_products/Resources/Private/Language/locallang.xlf:tx_epproducts_domain_model_infobox',
|
||||
'default_sortby' => 'ORDER BY title',
|
||||
'label' => 'title',
|
||||
'prependAtCopy' => '[COPY %s]',
|
||||
'tstamp' => 'tstamp',
|
||||
'crdate' => 'crdate',
|
||||
'cruser_id' => 'cruser_id',
|
||||
@@ -18,7 +19,7 @@ return [
|
||||
'starttime' => 'starttime',
|
||||
'endtime' => 'endtime',
|
||||
],
|
||||
'searchFields' => 'name',
|
||||
'searchFields' => 'title,text',
|
||||
'iconfile' => 'EXT:ep_theme/Resources/Public/images/icon_ce.svg',
|
||||
],
|
||||
'types' => [
|
||||
@@ -51,6 +52,7 @@ return [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'items' => [
|
||||
['', 0],
|
||||
|
||||
+5
-2
@@ -4,6 +4,7 @@ return [
|
||||
'title' => 'LLL:EXT:ep_products/Resources/Private/Language/locallang.xlf:tx_epproducts_domain_model_journey',
|
||||
'default_sortby' => 'ORDER BY name',
|
||||
'label' => 'name',
|
||||
'prependAtCopy' => '[COPY %s]',
|
||||
'tstamp' => 'tstamp',
|
||||
'crdate' => 'crdate',
|
||||
'cruser_id' => 'cruser_id',
|
||||
@@ -33,6 +34,7 @@ return [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'sys_language',
|
||||
'foreign_table_where' => 'ORDER BY sys_language.title',
|
||||
@@ -47,12 +49,13 @@ return [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'items' => [
|
||||
['', 0],
|
||||
],
|
||||
'foreign_table' => 'tx_epproducts_domain_model_city',
|
||||
'foreign_table_where' => 'AND tx_epproducts_domain_model_city.pid=###CURRENT_PID### AND tx_epproducts_domain_model_city.sys_language_uid IN (-1,0)',
|
||||
'foreign_table' => 'tx_epproducts_domain_model_journey',
|
||||
'foreign_table_where' => 'AND tx_epproducts_domain_model_journey.pid=###CURRENT_PID### AND tx_epproducts_domain_model_journey.sys_language_uid IN (-1,0)',
|
||||
],
|
||||
],
|
||||
'l10n_diffsource' => [
|
||||
|
||||
+3
@@ -3,6 +3,7 @@ return [
|
||||
'ctrl' => [
|
||||
'title' => 'LLL:EXT:ep_products/Resources/Private/Language/locallang.xlf:tx_epproducts_domain_model_matchcode',
|
||||
'label' => 'code',
|
||||
'prependAtCopy' => '[COPY %s]',
|
||||
'tstamp' => 'tstamp',
|
||||
'crdate' => 'crdate',
|
||||
'cruser_id' => 'cruser_id',
|
||||
@@ -34,6 +35,7 @@ return [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'sys_language',
|
||||
'foreign_table_where' => 'ORDER BY sys_language.title',
|
||||
@@ -48,6 +50,7 @@ return [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'items' => [
|
||||
['', 0],
|
||||
|
||||
+5
-1
@@ -3,6 +3,7 @@ return [
|
||||
'ctrl' => [
|
||||
'title' => 'LLL:EXT:ep_products/Resources/Private/Language/locallang.xlf:tx_epproducts_domain_model_officetip',
|
||||
'label' => 'label',
|
||||
'prependAtCopy' => '[COPY %s]',
|
||||
'label_userFunc' => \EP\EpProducts\Service\LabelService::class . '->getOfficetipLabel',
|
||||
'tstamp' => 'tstamp',
|
||||
'crdate' => 'crdate',
|
||||
@@ -18,7 +19,7 @@ return [
|
||||
'starttime' => 'starttime',
|
||||
'endtime' => 'endtime',
|
||||
],
|
||||
'searchFields' => 'text,author,product,',
|
||||
'searchFields' => 'label,text,author',
|
||||
'iconfile' => 'EXT:ep_theme/Resources/Public/images/icon_ce.svg',
|
||||
],
|
||||
'types' => [
|
||||
@@ -34,6 +35,7 @@ return [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'sys_language',
|
||||
'foreign_table_where' => 'ORDER BY sys_language.title',
|
||||
@@ -48,6 +50,7 @@ return [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'items' => [
|
||||
['', 0],
|
||||
@@ -133,6 +136,7 @@ return [
|
||||
'label' => 'Autor',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'tx_epproducts_domain_model_teammember',
|
||||
'minitems' => 1,
|
||||
|
||||
+13
@@ -3,6 +3,7 @@ return [
|
||||
'ctrl' => [
|
||||
'title' => 'LLL:EXT:ep_products/Resources/Private/Language/locallang.xlf:tx_epproducts_domain_model_product',
|
||||
'label' => 'name_internal',
|
||||
'prependAtCopy' => '[COPY %s]',
|
||||
'label_userFunc' => \EP\EpProducts\Service\LabelService::class . '->getProductLabel',
|
||||
'default_sortby' => 'ORDER BY name_internal',
|
||||
'tstamp' => 'tstamp',
|
||||
@@ -54,6 +55,7 @@ return [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'sys_language',
|
||||
'foreign_table_where' => 'ORDER BY sys_language.title',
|
||||
@@ -68,6 +70,7 @@ return [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'items' => [
|
||||
['', 0],
|
||||
@@ -631,6 +634,7 @@ return [
|
||||
'label' => 'Konzept',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'tx_epproducts_domain_model_concept',
|
||||
'foreign_table_where' => 'AND 1=1 ORDER BY name',
|
||||
@@ -643,6 +647,7 @@ return [
|
||||
'label' => 'Land',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'tx_epproducts_domain_model_country',
|
||||
'foreign_table_where' => 'AND 1=1 ORDER BY name',
|
||||
@@ -655,6 +660,7 @@ return [
|
||||
'label' => 'Gebiet',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'tx_epproducts_domain_model_region',
|
||||
'foreign_table_where' => 'AND 1=1 ORDER BY name',
|
||||
@@ -667,6 +673,7 @@ return [
|
||||
'label' => 'Stadt/Ort',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'tx_epproducts_domain_model_city',
|
||||
'foreign_table_where' => 'AND 1=1 ORDER BY name',
|
||||
@@ -679,6 +686,7 @@ return [
|
||||
'label' => 'Anreise',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'tx_epproducts_domain_model_journey',
|
||||
'foreign_table_where' => 'AND 1=1 ORDER BY name',
|
||||
@@ -735,6 +743,7 @@ return [
|
||||
'label' => 'Unterkunft für Belegungskalender',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'tx_epproducts_domain_model_hotel',
|
||||
'foreign_table_where' => 'AND 1=1 ORDER BY tx_epproducts_domain_model_hotel.name',
|
||||
@@ -748,6 +757,7 @@ return [
|
||||
'label' => 'Officetipp',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'tx_epproducts_domain_model_officetip',
|
||||
'items' => [
|
||||
@@ -787,6 +797,7 @@ return [
|
||||
'label' => 'Produkt',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'tx_epproducts_domain_model_product',
|
||||
'foreign_table_where' => 'AND tx_epproducts_domain_model_product.uid != ###THIS_UID### ORDER BY tx_epproducts_domain_model_product.name_internal',
|
||||
@@ -858,6 +869,7 @@ return [
|
||||
'label' => 'Badge',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'tx_epproducts_domain_model_badge',
|
||||
'foreign_table_where' => 'AND tx_epproducts_domain_model_badge.deleted = 0 ORDER BY tx_epproducts_domain_model_badge.title',
|
||||
@@ -873,6 +885,7 @@ return [
|
||||
'label' => 'Infobox nicht buchbar',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'tx_epproducts_domain_model_infobox',
|
||||
'foreign_table_where' => 'AND tx_epproducts_domain_model_infobox.deleted = 0 ORDER BY tx_epproducts_domain_model_infobox.title',
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user