![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/mautic.corals.io/app/bundles/CampaignBundle/Membership/ |
<?php namespace Mautic\CampaignBundle\Membership; use Mautic\CampaignBundle\CampaignEvents; use Mautic\CampaignBundle\Entity\Campaign; use Mautic\CampaignBundle\Event\CampaignLeadChangeEvent; use Mautic\LeadBundle\Entity\Lead; use Symfony\Component\EventDispatcher\EventDispatcherInterface; class EventDispatcher { public function __construct( private EventDispatcherInterface $dispatcher ) { } /** * @param string $action */ public function dispatchMembershipChange(Lead $contact, Campaign $campaign, $action): void { $this->dispatcher->dispatch( new CampaignLeadChangeEvent($campaign, $contact, $action), CampaignEvents::CAMPAIGN_ON_LEADCHANGE ); } public function dispatchBatchMembershipChange(array $contacts, Campaign $campaign, $action): void { $this->dispatcher->dispatch( new CampaignLeadChangeEvent($campaign, $contacts, $action), CampaignEvents::LEAD_CAMPAIGN_BATCH_CHANGE ); } }