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
1 2 3 4 5 6 7 8 9 10 11 12 | 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.