Skip to content
Snippets Groups Projects
Commit b99485c3 authored by Melissa Miller's avatar Melissa Miller
Browse files

add a few shortcut variables

parent dac85c3a
No related branches found
No related tags found
No related merge requests found
......@@ -31,6 +31,9 @@ class ModuleConfigurationForm extends ConfigFormBase {
*/
public function buildForm(array $form, FormStateInterface $form_state) {
$config = $this->config('wcm8_siteinfo.settings');
$site_config = $this->config('system.site');
$site_name = $site_config->get('name');
$site_mail = $site_config->get('mail');
$form['siteinfo'] = array(
'#type' => 'vertical_tabs',
......@@ -59,7 +62,7 @@ class ModuleConfigurationForm extends ConfigFormBase {
'#description' => $this->t('Main name for the site - it should be your college, department or organization name.'),
'#size' => '60',
'#maxlength' => '75',
'#default_value' => $this->config('system.site')->get('name'),
'#default_value' => $site_name,
);
// Contact Information tab
......@@ -119,7 +122,7 @@ class ModuleConfigurationForm extends ConfigFormBase {
'#type' => 'email',
'#title' => $this->t('Email'),
'#description' => $this->t('Main contact email for your site.'),
'#default_value' => $config->get('email'),
'#default_value' => $site_mail,
);
// Social Networking tab
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment