32 lines
643 B
PHP
32 lines
643 B
PHP
<?php
|
|
|
|
namespace App\Service;
|
|
|
|
use Doctrine\ORM\EntityManagerInterface;
|
|
|
|
use App\Entity\Hub;
|
|
use App\Entity\HubFilterLog;
|
|
|
|
class HubFilterLogger
|
|
{
|
|
protected $em;
|
|
|
|
public function __construct(EntityManagerInterface $em)
|
|
{
|
|
$this->em = $em;
|
|
}
|
|
|
|
public function logFilteredHub(Hub $hub, $filter_type, $jo_id, $customer_id)
|
|
{
|
|
$hub_filter_log = new HubFilterLog();
|
|
|
|
$hub_filter_log->setHub($hub)
|
|
->setFilterTypeId($filter_type)
|
|
->setJobOrderId($jo_id)
|
|
->setCustomerId($customer_id);
|
|
|
|
$this->em->persist($hub_filter_log);
|
|
$this->em->flush();
|
|
}
|
|
}
|
|
|