function UpdateFetcher::getFetchBaseUrl

Same name and namespace in other branches
  1. 9 core/modules/update/src/UpdateFetcher.php \Drupal\update\UpdateFetcher::getFetchBaseUrl()
  2. 10 core/modules/update/src/UpdateFetcher.php \Drupal\update\UpdateFetcher::getFetchBaseUrl()
  3. 11.x core/modules/update/src/UpdateFetcher.php \Drupal\update\UpdateFetcher::getFetchBaseUrl()

Overrides UpdateFetcherInterface::getFetchBaseUrl

1 call to UpdateFetcher::getFetchBaseUrl()
UpdateFetcher::buildFetchUrl in core/modules/update/src/UpdateFetcher.php
Generates the URL to fetch information about project updates.

File

core/modules/update/src/UpdateFetcher.php, line 107

Class

UpdateFetcher
Fetches project information from remote locations.

Namespace

Drupal\update

Code

public function getFetchBaseUrl($project) {
    if (isset($project['info']['project status url'])) {
        $url = $project['info']['project status url'];
    }
    else {
        $url = $this->fetchUrl;
        if (empty($url)) {
            $url = static::UPDATE_DEFAULT_URL;
        }
    }
    return $url;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.