parent
baebc4fd25
commit
73271de39a
2 changed files with 21 additions and 20 deletions
|
@ -48,24 +48,4 @@ final class PushBlogPostToSocialMedia implements EventSubscriberInterface {
|
|||
]);
|
||||
}
|
||||
|
||||
private function shouldBePushed(Post $post): bool {
|
||||
if ($post->isExternalPost()) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!$post->isPublished()) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!$post->shouldSendToSocialMedia()) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if ($post->hasBeenSentToSocialMedia()) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue