getModuleName(); $mail_plugin_id = $email_provider->getMailPluginId(); $mail_plugin_definition = $email_provider->getMailPluginDefinition(); if ($mail_module_name || $mail_plugin_id) { $t_args = [ '@module' => $mail_module_name, '@plugin_id' => $mail_plugin_id, '@plugin_label' => $mail_plugin_definition['label'], '@plugin_description' => $mail_plugin_definition['description'], ]; $requirements['webform_email'] = [ 'title' => t('Webform: HTML email support'), 'value' => ($mail_module_name) ? t('Provided by the @module module.', $t_args) : t('Provided by @plugin_id mail plugin.', $t_args), 'description' => new FormattableMarkup('@plugin_label: @plugin_description', $t_args), 'severity' => REQUIREMENT_OK, ]; } else { $requirements['webform_email'] = [ 'title' => t('Webform: HTML email support'), 'value' => t('Unable to determine email module and/or provider'), 'severity' => REQUIREMENT_ERROR, ]; } /****************************************************************************/ // Check private file upload. /****************************************************************************/ $scheme_options = ManagedFile::getVisibleStreamWrappers(); if (isset($scheme_options['private'])) { $requirements['webform_file_private'] = [ 'title' => t('Webform: Private files'), 'value' => t('Private file system is set.'), ]; } else { $requirements['webform_file_private'] = [ 'title' => t('Webform: Private files'), 'value' => t('Private file system is not set.'), 'description' => t('This must be changed in settings.php. For more information see: DRUPAL-PSA-2016-003'), 'severity' => REQUIREMENT_WARNING, ]; } /****************************************************************************/ // Check external libraries. /****************************************************************************/ /** @var \Drupal\webform\WebformLibrariesManagerInterface $libraries_manager */ $libraries_manager = \Drupal::service('webform.libraries_manager'); $requirements += $libraries_manager->requirements(); /****************************************************************************/ // Check Bootstrap theme. /****************************************************************************/ if (\Drupal::config('webform.settings')->get('requirements.bootstrap')) { $spam_protection = FALSE; $themes = \Drupal::service('theme_handler')->listInfo(); foreach ($themes as $theme) { if ((isset($theme->base_themes) && isset($theme->base_themes['bootstrap'])) || $theme == 'bootstrap') { $spam_protection = TRUE; } } if ($spam_protection) { if (\Drupal::moduleHandler()->moduleExists('webform_bootstrap')) { $requirements['webform_bootstrap'] = [ 'title' => t('Webform: Bootstrap integration'), 'value' => t('Webform Bootstrap module installed.'), ]; } else { $requirements['webform_bootstrap'] = [ 'title' => t('Webform: Bootstrap integration'), 'value' => t('Webform Bootstrap Integration module not installed.'), 'description' => t('The Webform Bootstrap module helps support Webform to Bootstrap integration. Disable Webform Bootstrap Integration warning', [':href' => Url::fromRoute('webform.config.advanced')->toString()]), 'severity' => REQUIREMENT_WARNING, ]; } } } /****************************************************************************/ // Check SPAM protection. /****************************************************************************/ if (\Drupal::config('webform.settings')->get('requirements.spam')) { $spam_protection = FALSE; $installed_projects = [ '#prefix' => '