Magento works with a lot of drop-down fields that you can select in the forms of the application. Also, we can make use of drop-down fields in our custom fields.
A drop-down or multiselect field always has options that you can choose in this field. To render these options, Magento uses a class that returns the options. Such a class is called a source model.
In this recipe, we will see which source models Magento uses and how we can create a custom source model for a custom configuration field.
For this recipe, we will create a source model that is linked to a custom configuration field. This is done in the Packt_Helloworld
module, which we will extend in this recipe.