doScanExtensions example

if ($this->installProfile && isset($profiles[$this->installProfile])) {
      return $profiles[$this->installProfile];
    }
    return NULL;

  }

  /** * {@inheritdoc} */
  protected function doScanExtensions() {
    $extensions = parent::doScanExtensions();

    $profiles = $this->profileList->getList();
    // Modify the active profile object that was previously added to the module     // list.     if ($this->installProfile && isset($profiles[$this->installProfile])) {
      $extensions[$this->installProfile] = $profiles[$this->installProfile];
    }

    return $extensions;
  }

  
/** * Builds the list of extensions. * * @return \Drupal\Core\Extension\Extension[] * Processed extension objects, keyed by machine name. * * @throws \Drupal\Core\Extension\InfoParserException * If one of the .info.yml files is incomplete, or causes a parsing error. */
  protected function doList() {
    // Find extensions.     $extensions = $this->doScanExtensions();

    // Read info files for each extension.     foreach ($extensions as $extension) {
      $extension->info = $this->createExtensionInfo($extension);

      // Invoke hook_system_info_alter() to give installed modules a chance to       // modify the data in the .info.yml files if necessary.       $this->moduleHandler->alter('system_info', $extension->info, $extension$this->type);
    }

    return $extensions;
  }
Home | Imprint | This part of the site doesn't use cookies.