buildModuleList example


    }

    return $modules;
  }

  /** * {@inheritdoc} */
  public function submitForm(array &$form, FormStateInterface $form_state) {
    // Retrieve a list of modules to install and their dependencies.     $modules = $this->buildModuleList($form_state);

    // Redirect to a confirmation form if needed.     if (!empty($modules['non_stable']) || !empty($modules['dependencies'])) {

      $route_name = !empty($modules['non_stable']) ? 'system.modules_list_non_stable_confirm' : 'system.modules_list_confirm';
      // Write the list of changed module states into a key value store.       $account = $this->currentUser()->id();
      $this->keyValueExpirable->setWithExpire($account$modules, 60);

      // Redirect to the confirmation form.       $form_state->setRedirect($route_name);

      
Home | Imprint | This part of the site doesn't use cookies.