get(self::FIELD_EXTERNAL_LINK)->get(0)) ? $link->getValue() : NULL; } /** * @return Collection|Term[] */ public function getTags(): Collection { return new Collection($this->get(self::FIELD_TAGS)->referencedEntities()); } public function hasBeenSentToSocialMedia(): bool { return (bool) $this->get(self::FIELD_SENT_TO_SOCIAL_MEDIA)->getString(); } public function hasTweet(): bool { return (bool) $this->get(self::FIELD_HAS_TWEET)->getString(); } public function isExternalPost(): bool { return (bool) $this->getExternalLink(); } public function markAsSentToSocialMedia(): self { $this->set(self::FIELD_SENT_TO_SOCIAL_MEDIA, TRUE); return $this; } public function setTags(array $tags): void { $this->set(self::FIELD_TAGS, $tags); } public function shouldSendToSocialMedia(): bool { return (bool) $this->get(self::FIELD_SEND_TO_SOCIAL_MEDIA)->getString(); } public function toTweet(): string { return ''; } }