chrisbryan17's picture
Upload folder using huggingface_hub
d2897cd verified
raw
history blame contribute delete
713 Bytes
<?php
namespace Mautic\PluginBundle\Helper;
use Mautic\CoreBundle\Factory\MauticFactory;
use Mautic\PluginBundle\EventListener\PushToIntegrationTrait;
class EventHelper
{
use PushToIntegrationTrait;
public static function pushLead($config, $lead, MauticFactory $factory): bool
{
$contact = $factory->getEntityManager()->getRepository(\Mautic\LeadBundle\Entity\Lead::class)->getEntityWithPrimaryCompany($lead);
/** @var IntegrationHelper $integrationHelper */
$integrationHelper = $factory->getHelper('integration');
static::setStaticIntegrationHelper($integrationHelper);
$errors = [];
return static::pushIt($config, $contact, $errors);
}
}