Loading src/Form/Steps/AddServices.php +3 −3 Original line number Diff line number Diff line Loading @@ -93,7 +93,7 @@ class AddServices extends ConfigFormBase { if (isset($value['code'])) { foreach ($value['code'] as $code) { if (preg_match_all('/tarteaucitron.user.([A-z]+)[\s]+=[\s]+[\\]?[\"]?[\']?###([^.]+)###/m', $code, $match)) { if (preg_match_all('/tarteaucitron.user.([A-z]+)[\s]+=[\s]+[\\]?[\"]?[\']?###([^.]+)###/m', (is_array($code) ? implode(", ", $code) : $code), $match)) { for ($i = 0; $i < count($match[1]); $i++) { $form['service']['type_' . $type]['details_' . $service]['user_' . $service . '_' . $match[1][$i]] = [ '#type' => 'textfield', Loading Loading @@ -134,7 +134,7 @@ class AddServices extends ConfigFormBase { if (isset($value['code'])) { foreach ($value['code'] as $code) { if (preg_match_all('/tarteaucitron.user.([A-z]+)[\s]+=[\s]+[\\]?[\"]?[\']?###([^.]+)###/m', $code, $match)) { if (preg_match_all('/tarteaucitron.user.([A-z]+)[\s]+=[\s]+[\\]?[\"]?[\']?###([^.]+)###/m', (is_array($code) ? implode(", ", $code) : $code), $match)) { for ($i = 0; $i < count($match[1]); $i++) { $form_state->setValue('user_' . $service . '_' . $match[1][$i], $form_state->getValue('user_' . $service . '_' . $match[1][$i]) ?: NULL); } Loading Loading @@ -166,7 +166,7 @@ class AddServices extends ConfigFormBase { if (isset($value['code'])) { foreach ($value['code'] as $code) { if (preg_match_all('/tarteaucitron.user.([A-z]+)[\s]+=[\s]+[\\]?[\"]?[\']?###([^.]+)###/m', $code, $match)) { if (preg_match_all('/tarteaucitron.user.([A-z]+)[\s]+=[\s]+[\\]?[\"]?[\']?###([^.]+)###/m', (is_array($code) ? implode(", ", $code) : $code), $match)) { for ($i = 0; $i < count($match[1]); $i++) { if ($form_state->getValue('user_' . $service . '_' . $match[1][$i])) { $config->set('user.' . $match[1][$i], $form_state->getValue('user_' . $service . '_' . $match[1][$i])); Loading Loading
src/Form/Steps/AddServices.php +3 −3 Original line number Diff line number Diff line Loading @@ -93,7 +93,7 @@ class AddServices extends ConfigFormBase { if (isset($value['code'])) { foreach ($value['code'] as $code) { if (preg_match_all('/tarteaucitron.user.([A-z]+)[\s]+=[\s]+[\\]?[\"]?[\']?###([^.]+)###/m', $code, $match)) { if (preg_match_all('/tarteaucitron.user.([A-z]+)[\s]+=[\s]+[\\]?[\"]?[\']?###([^.]+)###/m', (is_array($code) ? implode(", ", $code) : $code), $match)) { for ($i = 0; $i < count($match[1]); $i++) { $form['service']['type_' . $type]['details_' . $service]['user_' . $service . '_' . $match[1][$i]] = [ '#type' => 'textfield', Loading Loading @@ -134,7 +134,7 @@ class AddServices extends ConfigFormBase { if (isset($value['code'])) { foreach ($value['code'] as $code) { if (preg_match_all('/tarteaucitron.user.([A-z]+)[\s]+=[\s]+[\\]?[\"]?[\']?###([^.]+)###/m', $code, $match)) { if (preg_match_all('/tarteaucitron.user.([A-z]+)[\s]+=[\s]+[\\]?[\"]?[\']?###([^.]+)###/m', (is_array($code) ? implode(", ", $code) : $code), $match)) { for ($i = 0; $i < count($match[1]); $i++) { $form_state->setValue('user_' . $service . '_' . $match[1][$i], $form_state->getValue('user_' . $service . '_' . $match[1][$i]) ?: NULL); } Loading Loading @@ -166,7 +166,7 @@ class AddServices extends ConfigFormBase { if (isset($value['code'])) { foreach ($value['code'] as $code) { if (preg_match_all('/tarteaucitron.user.([A-z]+)[\s]+=[\s]+[\\]?[\"]?[\']?###([^.]+)###/m', $code, $match)) { if (preg_match_all('/tarteaucitron.user.([A-z]+)[\s]+=[\s]+[\\]?[\"]?[\']?###([^.]+)###/m', (is_array($code) ? implode(", ", $code) : $code), $match)) { for ($i = 0; $i < count($match[1]); $i++) { if ($form_state->getValue('user_' . $service . '_' . $match[1][$i])) { $config->set('user.' . $match[1][$i], $form_state->getValue('user_' . $service . '_' . $match[1][$i])); Loading