Exclude deleted form from display below post/page check

[MAILPOET-2710]
This commit is contained in:
Rostislav Wolny
2020-02-13 20:14:28 +01:00
committed by Jack Kitterhing
parent c396d74d90
commit ede14fc661
2 changed files with 9 additions and 12 deletions

View File

@ -84,7 +84,7 @@ class DisplayFormInWPContent {
* @return FormEntity[]
*/
private function getForms(): array {
$forms = $this->formsRepository->findAll();
$forms = $this->formsRepository->findBy(['deletedAt' => null]);
return array_filter($forms, function($form) {
return $this->shouldDisplayFormBellowContent($form);
});