Only provide an array of module names to install.
This commit is contained in:
parent
f360de1ea1
commit
1f3273a7eb
|
@ -68,7 +68,7 @@ function farm_install_modules(array &$install_state) {
|
|||
|
||||
// Assemble the batch operation for installing modules.
|
||||
$operations = [];
|
||||
foreach ($modules as $module => $weight) {
|
||||
foreach ($modules as $module) {
|
||||
$operations[] = [
|
||||
'_farm_install_module_batch',
|
||||
[
|
||||
|
|
|
@ -115,7 +115,8 @@ class FarmModulesForm extends FormBase {
|
|||
* {@inheritdoc}
|
||||
*/
|
||||
public function submitForm(array &$form, FormStateInterface $form_state) {
|
||||
$modules = array_filter($form_state->getValue('modules'));
|
||||
// Build array of module names to install.
|
||||
$modules = array_values(array_filter($form_state->getValue('modules')));
|
||||
$this->state->set('farm.install_modules', $modules);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue