Add schema to the config

Created on 20 May 2024, about 1 month ago
Updated 21 May 2024, about 1 month ago

Since the module has configuration, add the following files to it:

  • config/schema/advanced_mautic_integration.schema.yml
  • config/install/advanced_mautic_integration.settings.yml

This way, when the module is enabled, default values and data types for all the expected config can be counted on to exist, and you don't need to validate every time you call $config->get(). For example:

'trackPageviews' => $config->get('track.pageviews') ?? FALSE,

Just becomes

'trackPageviews' => $config->get('track.pageviews'); 

Because you have a schema with data types for all your configuration variables, and you have already defined default values in your install :)

📌 Task
Status

Needs review

Version

1.0

Component

Code

Created by

🇵🇱Poland gpietrzak Wrocław

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024