You are here

public function Email::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/Email.php, line 22

Class

Email
Provides 'email' platform.

Namespace

Drupal\social_media_links\Plugin\SocialMediaLinks\Platform

Code

public function getUrl() {
  return Url::fromUri('mailto:' . $this
    ->getValue());
}