예제 #1
0
 public function onLeadPointChange(PointsChangeEvent $event)
 {
     /** @var \Mautic\LeadBundle\Entity\Lead $lead */
     $lead = $event->getLead();
     $serializerGroups = array("leadDetails", "userList", "publishDetails", "ipAddress");
     $payload = array('lead' => $lead, 'points' => array('old_points' => $event->getOldPoints(), 'new_points' => $event->getNewPoints()));
     $types = array(LeadEvents::LEAD_POINTS_CHANGE);
     $webhooks = $this->getEventWebooksByType($types);
     $this->webhookModel->QueueWebhooks($webhooks, $payload, $serializerGroups, true);
 }
예제 #2
0
 /**
  * Trigger applicable events for the lead.
  *
  * @param PointsChangeEvent $event
  */
 public function onLeadPointsChange(PointsChangeEvent $event)
 {
     $this->triggerModel->triggerEvents($event->getLead());
 }
예제 #3
0
 /**
  * Trigger applicable events for the lead
  *
  * @param PointsChangeEvent $event
  */
 public function onLeadPointsChange(PointsChangeEvent $event)
 {
     /** @var \Mautic\PointBundle\Model\TriggerModel */
     $model = $this->factory->getModel('point.trigger');
     $model->triggerEvents($event->getLead());
 }