Extract helper methods

This commit is contained in:
Oliver Davies 2020-11-10 19:51:53 +00:00
parent 06c3da1880
commit a656280e7b
5 changed files with 24 additions and 11 deletions

View file

@ -51,6 +51,12 @@ class Post extends Node implements ContentEntityBundleInterface {
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);
}