public function Contact::getUrl in Social Media Links Block and Field 8.2
Get the full url for the platform.
Return the full url, including urlPrefix, user value and urlSuffix This method is useful to change the url to match platform specific requirements. E.g.: "mailto:VALUE" for email platform or "user-path:/" for internal urls.
Return value
\Drupal\Core\Url Returns the full Url object for the platform.
Overrides PlatformBase::getUrl
File
- src/
Plugin/ SocialMediaLinks/ Platform/ Contact.php, line 31
Class
- Contact
- Provides 'contact' platform.
Namespace
Drupal\social_media_links\Plugin\SocialMediaLinks\PlatformCode
public function getUrl() {
// Generate the internal url based on the user input.
// See Url::fromUserInput() for more information.
return Url::fromUserInput('/' . $this
->getValue() . $this
->getUrlSuffix());
}