['updatePxe', EventPriorities::POST_WRITE], ]; } /** * @throws TransportExceptionInterface * @throws ServerExceptionInterface * @throws RedirectionExceptionInterface * @throws ClientExceptionInterface */ public function updatePxe(ViewEvent $event): void { $clientOutput = $event->getControllerResult(); $method = $event->getRequest()->getMethod(); if (!$clientOutput instanceof ClientOutput || (Request::METHOD_POST !== $method && Request::METHOD_PUT !== $method && Request::METHOD_PATCH !== $method)) { return; } /** @var Client $client */ $client = $clientOutput->getEntity(); if ($client->getTemplate() === null) { return; } $this->postAction->__invoke($client, $client->getTemplate()); } }