protected LinkManagerBase::getLinkDomain()
Gets the link domain.
Return value
string The link domain.
File
- core/modules/rest/src/LinkManager/LinkManagerBase.php, line 45
Class
- LinkManagerBase
- Defines an abstract base-class for REST link manager objects.
Namespace
Drupal\rest\LinkManager
Code
protected function getLinkDomain() { if (empty($this->linkDomain)) { if ($domain = $this->configFactory->get('rest.settings')->get('link_domain')) { $this->linkDomain = rtrim($domain, '/'); } else { $request = $this->requestStack->getCurrentRequest(); $this->linkDomain = $request->getSchemeAndHttpHost() . $request->getBasePath(); } } return $this->linkDomain; }
Please login to continue.