Adding configuration parameters
When you want to save some configuration parameters for your module, you can use the Magento configuration table to save your configuration in it. You can find all the configuration forms under Stores | Configuration in the Magento backend. In this recipe, we will add an extra page with some configuration parameters.
Getting ready
Like the previous recipes in this chapter, we will build further on the module that we have created in the previous recipes. Make sure you have the module files installed.
How to do it...
The following instructions describe what you have to do when you want to add some custom configuration parameters:
The system configuration is always configured in the
system.xml
file of the module. So create the fileapp/code/Packt/HelloWorld/etc/adminhtml/system.xml
with the following content:<?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config...