Commit a603e0f2 authored by xjm's avatar xjm

Issue #2887259 by Tessa Bakker, Sutharsan: Code style issues of require_once...

Issue #2887259 by Tessa Bakker, Sutharsan: Code style issues of require_once in ImportForm::submitForm
parent 3148d1c4
......@@ -166,7 +166,7 @@ public function validateForm(array &$form, FormStateInterface $form_state) {
* {@inheritdoc}
*/
public function submitForm(array &$form, FormStateInterface $form_state) {
\Drupal::moduleHandler()->loadInclude('locale', 'translation.inc');
$this->moduleHandler->loadInclude('locale', 'translation.inc');
// Add language, if not yet supported.
$language = $this->languageManager->getLanguage($form_state->getValue('langcode'));
if (empty($language)) {
......@@ -185,7 +185,6 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
batch_set($batch);
// Create or update all configuration translations for this language.
\Drupal::moduleHandler()->loadInclude('locale', 'bulk.inc');
if ($batch = locale_config_batch_update_components($options, [$form_state->getValue('langcode')])) {
batch_set($batch);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment