ensureRequiredDependencies example



  /** * {@inheritdoc} */
  protected function doList() {
    // Find modules.     $extensions = parent::doList();
    // It is possible that a module was marked as required by     // hook_system_info_alter() and modules that it depends on are not required.     foreach ($extensions as $extension) {
      $this->ensureRequiredDependencies($extension$extensions);
    }

    // Add status, weight, and schema version.     $installed_modules = $this->configFactory->get('core.extension')->get('module') ?: [];
    foreach ($extensions as $name => $module) {
      $module->weight = $installed_modules[$name] ?? 0;
      $module->status = (int) isset($installed_modules[$name]);
      $module->schema_version = UpdateHookRegistry::SCHEMA_UNINSTALLED;
    }
    $extensions = $this->moduleHandler->buildModuleDependencies($extensions);

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