You are here

public function SocialPost::getLink in Social Post 3.x

Same name and namespace in other branches
  1. 8.2 src/Entity/SocialPost.php \Drupal\social_post\Entity\SocialPost::getLink()

Gets the link to the user's profile in provider.

Return value

\Drupal\link\LinkItemInterface|null The link object containing the url to the user's profile.

File

src/Entity/SocialPost.php, line 96

Class

SocialPost
Defines the Social Post entity.

Namespace

Drupal\social_post\Entity

Code

public function getLink() : ?LinkItemInterface {
  return $this
    ->get('link')[0] ?? NULL;
}