You are here

protected function ModifiedFiles::buildUrl in Automatic Updates 8

Build an extension's hash file URL.

Parameters

array $info: The extension's info.

Return value

string The URL endpoint with for an extension.

1 call to ModifiedFiles::buildUrl()
ModifiedFiles::getHashRequests in src/Services/ModifiedFiles.php
Get an iterator of promises that return a resource stream.

File

src/Services/ModifiedFiles.php, line 196

Class

ModifiedFiles
Modified files service.

Namespace

Drupal\automatic_updates\Services

Code

protected function buildUrl(array $info) {
  $version = $info['version'];
  $project_name = $info['project'];
  $hash_name = $this
    ->getHashName($info);
  $uri = ltrim($this->configFactory
    ->get('automatic_updates.settings')
    ->get('hashes_uri'), '/');
  return Url::fromUri("{$uri}/{$project_name}/{$version}/{$hash_name}")
    ->toString();
}