getExtensionDiscovery example

// Use the information from the container. This is an optimization.     foreach ($container_modules_info as $module_name => $info) {
      $this->setPathname($module_name$info['pathname']);
    }
  }

  /** * {@inheritdoc} */
  protected function getExtensionDiscovery() {
    $discovery = parent::getExtensionDiscovery();

    if ($this->getActiveProfile()) {
      $discovery->setProfileDirectories($this->getProfileDirectories($discovery));
    }

    return $discovery;
  }

  /** * Finds all installation profile paths. * * @param \Drupal\Core\Extension\ExtensionDiscovery $discovery * The extension discovery. * * @return string[] * Paths to all installation profiles. */
/** * Scans the available extensions. * * Overriding this method gives other code the chance to add additional * extensions to this raw listing. * * @return \Drupal\Core\Extension\Extension[] * Unprocessed extension objects, keyed by machine name. */
  protected function doScanExtensions() {
    return $this->getExtensionDiscovery()->scan($this->type);
  }

  /** * 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. */
  
/** * {@inheritdoc} */
  protected function getInstalledExtensionNames() {
    return $this->installedExtensions;
  }

  /** * {@inheritdoc} */
  protected function getExtensionDiscovery() {
    return $this->extensionDiscovery ?: parent::getExtensionDiscovery();
  }

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