diff --git a/web/modules/custom/blog/src/Entity/Node/Post.php b/web/modules/custom/blog/src/Entity/Node/Post.php index 74befb54d..f6b2eb52c 100644 --- a/web/modules/custom/blog/src/Entity/Node/Post.php +++ b/web/modules/custom/blog/src/Entity/Node/Post.php @@ -49,6 +49,10 @@ class Post extends Node implements ContentEntityBundleInterface { $this->set('field_tags', $tags); } + public function shouldSendToSocialMedia(): bool { + return (bool) $this->get('field_send_to_social_media')->getString(); + } + public function toTweet(): string { $parts = [ $this->label(),