PersonAddressMoveEvent on household move (wip)

This commit is contained in:
2022-02-19 14:04:51 +01:00
parent 8675bb65c1
commit caa63ea97a
11 changed files with 237 additions and 48 deletions

View File

@@ -11,6 +11,7 @@ declare(strict_types=1);
namespace Chill\PersonBundle\AccompanyingPeriod\Events;
use Chill\MainBundle\Entity\Address;
use Chill\MainBundle\Entity\Notification;
use Chill\PersonBundle\Entity\AccompanyingPeriod;
use Chill\PersonBundle\Event\Person\PersonAddressMoveEvent;
@@ -78,7 +79,7 @@ class PersonMoveEventSubscriber implements EventSubscriberInterface
) {
// reset the location, back to an address
$period->setPersonLocation(null);
$period->setAddressLocation($event->getPreviousAddress());
$period->setAddressLocation(Address::createFromAddress($event->getPreviousAddress()));
$notification = new Notification();
$notification