|
- <?php
-
- namespace Lc\SovBundle\Builder\Ticket;
-
- use Lc\SovBundle\Component\FormComponent;
- use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
-
- class TicketBuilder
- {
- protected FormComponent $formComponent;
- protected ParameterBagInterface $parameterBag;
-
- public function __construct(FormComponent $formComponent, ParameterBagInterface $parameterBag)
- {
- $this->formComponent = $formComponent;
- $this->parameterBag = $parameterBag;
- }
-
- // uploadImageTicketMessage
- public function uploadImageTicketMessage($formTicket): ?string
- {
- return $this->formComponent->uploadFile(
- $formTicket,
- 'image',
- $this->parameterBag->get('app.ticket_images_directory'),
- $this->parameterBag->get('app.ticket_images_subdirectory')
- );
- }
- }
|