Drupal 8 - system settings form

Submitted by superadmin on Sun, 12/27/2015 - 15:22

system_settings_form was a handy function in Drupal 7 that saved forms to variables. This has been replaced by ConfigFormBase in Drupal 8. 

If we want the same behavior in Drupal 8 that was present in system_settings_form, our form class must extend ConfigFormBase. In doing so we must implement the abstract getEditableConfigNames method which returns the config names which are editable.

Also our buildForm method should call it's parent buildForm so that the submit buttons can be added.