refs #2120. Remove pxe template when removed client
parent
64eeb5c88e
commit
d13e24cc23
|
@ -4,6 +4,7 @@ namespace App\EventListener;
|
|||
|
||||
use App\Controller\OgBoot\PxeBootFile\DeleteAction;
|
||||
use App\Controller\OgBoot\PxeBootFile\PostAction;
|
||||
use App\Controller\OgDhcp\Subnet\PutHostAction;
|
||||
use App\Entity\Client;
|
||||
use Doctrine\Bundle\DoctrineBundle\Attribute\AsEntityListener;
|
||||
use Doctrine\ORM\Event\PreUpdateEventArgs;
|
||||
|
@ -18,6 +19,7 @@ readonly class ClientMacListener
|
|||
{
|
||||
public function __construct(
|
||||
private DeleteAction $deleteAction,
|
||||
private PutHostAction $putHostAction,
|
||||
)
|
||||
{
|
||||
|
||||
|
@ -45,7 +47,7 @@ readonly class ClientMacListener
|
|||
return;
|
||||
}
|
||||
|
||||
$this->putHostAction->__invoke($oldMac, $client);
|
||||
$this->deleteAction->__invoke($oldMac);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue