acsiomatic / device-detector-bundle

Symfony Bundle for https://github.com/matomo-org/device-detector
https://packagist.org/packages/acsiomatic/device-detector-bundle
MIT License
11 stars 1 forks source link

Arrange Library and Bundle settings #30

Open renedelima opened 2 years ago

renedelima commented 2 years ago

Create separate sections for DeviceDetector and DeviceDetectorBundle itself in the configuration file.

renanbr commented 8 months ago
# config/packages/acsiomatic_device_detector.yaml

acsiomatic_device_detector:

    device_detector:

        # If true, DeviceDetector will trigger parser() when necessary
        auto_parse: true

        # Version truncation behavior, it may assume: major, minor, patch, build, or none
        # By default minor versions will be returned (e.g. X.Y)
        version_truncation: 'minor'

        cache:

            # If null, it will disable caching
            pool: 'cache.app'

        bot:

            # If true getBot() will only return true if a bot was detected (speeds up detection a bit)
            discard_information: false

            # If true, bot detection will completely be skipped (bots will be detected as regular devices then)
            skip_detection: false

    symfony:

        twig:

            # If null, it will not assign Twig variable
            variable_name: 'device'

        routing:

            # If null, it will not tag DeviceDetector as routing condition service
            condition_service_alias: 'device'