@@ -67,31 +67,32 @@ class SiteSettingsConfigForm extends ConfigFormBase {
// Global setting.
$form['template_key']=array(
'#type'=>'textfield',
'#type'=>'machine_name',
'#title'=>t('Template key'),
'#description'=>t('The key at which site settings should be made available in templates such as {{ site_settings.your_settings_group.your_setting_name }} with a template key of "site_settings".'),
'#default_value'=>$config->get('template_key'),
'#required'=>TRUE,
'#machine_name'=>[
'exists'=>[$this,'machineNameExists'],
],
);
returnparent::buildForm($form,$form_state);
}
/**
* {@inheritdoc}
* Machine name validation callback.
*
* This method needs to exist, but there can be only one so it never exists.