You are here

protected function InstantArticleRssEncoder::getLink in Facebook Instant Articles 3.x

Same name and namespace in other branches
  1. 8.2 src/Encoder/InstantArticleRssEncoder.php \Drupal\fb_instant_articles\Encoder\InstantArticleRssEncoder::getLink()

Helper function to get the URL of the site for the RSS feed <link> tag.

Return value

string URL of the site.

1 call to InstantArticleRssEncoder::getLink()
InstantArticleRssEncoder::encode in src/Encoder/InstantArticleRssEncoder.php

File

src/Encoder/InstantArticleRssEncoder.php, line 118

Class

InstantArticleRssEncoder
Facebook instant articles FBIA RSS encoder.

Namespace

Drupal\fb_instant_articles\Encoder

Code

protected function getLink() {
  if ($override = $this->config
    ->get('canonical_url_override')) {
    return $override;
  }
  else {
    return $this->currentRequest
      ->getSchemeAndHttpHost();
  }
}