Settings, Properties and the Cascade
Many parts of an application need some sort of configurability.
Configurability can mean things like global application settings, user preferences, but also the configuration of a component to adapt it to specific use cases in its occurrences throughout an application.
Different frameworks use different terms to describe this concept, such as Field, Attribute, Property, Prop, Setting, Preference. In ff they're called setting.
Defining a setting
To be accessible from within fast framework, a setting needs to be defined in the definitions folder of any plugin. all .xmlfiles in that folder will be parsed for setting definition.
file definitions/items.xml
Allowed values for type are:
text (default)
checkbox
select
bool
color
Depending on the given type, ff will provide appropriate ui elements to change the value of the setting.
if the attribute multiple is set to true, ff will return the setting as an array when processed by back-end code and will provide appropriate ui elements to edit multiple values of the setting.
[...extended syntax...]
Using settings in your code
Cascade
When you read a setting, the system checks the cascade from the bottom to the top. If the setting is not set, it checks if the next level