backdrop-contrib / examples

Examples for Developers
GNU General Public License v2.0
7 stars 9 forks source link

Do not append .settings to the configuration-object names #75

Closed avpaderno closed 1 year ago

avpaderno commented 1 year ago

There are some example modules that use code similar to the following one.

$config = config('form_example.settings');
$config->set('form_example_checkbox', FALSE);
$config->set('form_example_element_combined', '0000000000');
$config->set('form_example_textfield', '');
$config->set('form_example_element_discrete', array(
  'areacode' => '999',
  'prefix' => '999',
  'extension' => '9999',
));

The .settings suffix is not necessary, when the module uses just a configuration object.