Display form only if it is enabled

[MAILPOET-3075]
This commit is contained in:
Pavel Dohnal
2020-08-11 09:41:44 +02:00
committed by Veljko V
parent 51aa4055c9
commit ca8831e5bb
2 changed files with 11 additions and 1 deletions

View File

@@ -109,7 +109,10 @@ class DisplayFormInWPContent {
* @return array<string, FormEntity>
*/
private function getForms(): array {
$forms = $this->formsRepository->findBy(['deletedAt' => null], ['updatedAt' => 'ASC']);
$forms = $this->formsRepository->findBy([
'deletedAt' => null,
'status' => FormEntity::STATUS_ENABLED,
], ['updatedAt' => 'ASC']);
$forms = $this->filterOneFormInEachDisplayType($forms);
return $forms;
}