From 3812d6c15e34d89ee93c45e1fb45eeb6f88a2385 Mon Sep 17 00:00:00 2001 From: Brezo Cordero <8002881+brezocordero@users.noreply.github.com> Date: Thu, 14 Oct 2021 13:09:34 -0500 Subject: [PATCH] Select first form in list [MAILPOET-3847] --- lib/Form/FormsRepository.php | 16 ---------------- lib/Form/Widget.php | 6 ++++-- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/lib/Form/FormsRepository.php b/lib/Form/FormsRepository.php index 905311b5a7..f01bf9ae1d 100644 --- a/lib/Form/FormsRepository.php +++ b/lib/Form/FormsRepository.php @@ -27,22 +27,6 @@ class FormsRepository extends Repository { ->getResult(); } - /** - * @return FormEntity[] - */ - public function findAllActive(): array { - return $this->entityManager - ->createQueryBuilder() - ->select('f') - ->from(FormEntity::class, 'f') - ->where('f.status = (:enabled)') - ->andWhere('f.deletedAt IS NULL') - ->setParameter('enabled', FormEntity::STATUS_ENABLED) - ->orderBy('f.name', 'asc') - ->getQuery() - ->getResult(); - } - public function getNamesOfFormsForSegments(): array { $allNonDeletedForms = $this->findAllNotDeleted(); diff --git a/lib/Form/Widget.php b/lib/Form/Widget.php index aa2d64f3b5..d3692a9ed4 100644 --- a/lib/Form/Widget.php +++ b/lib/Form/Widget.php @@ -137,6 +137,8 @@ class Widget extends \WP_Widget {