Quellcode durchsuchen

TicketSolver : gestion context getTypeChoices()

develop
Guillaume vor 2 Jahren
Ursprung
Commit
3987761815
2 geänderte Dateien mit 5 neuen und 3 gelöschten Zeilen
  1. +4
    -2
      Form/Ticket/TicketFormType.php
  2. +1
    -1
      Solver/Ticket/TicketSolver.php

+ 4
- 2
Form/Ticket/TicketFormType.php Datei anzeigen

@@ -32,6 +32,7 @@ class TicketFormType extends SovTicketFormType
protected OrderShopStore $orderShopStore;
protected PriceSolver $priceSolver;
protected SectionStore $sectionStore;
protected TicketSolver $ticketSolver;

public function __construct(
Security $security,
@@ -43,13 +44,14 @@ class TicketFormType extends SovTicketFormType
PriceSolver $priceSolver,
SectionStore $sectionStore
) {
parent::__construct($entityManager, $translatorAdmin, $ticketSolver);
parent::__construct($entityManager, $translatorAdmin);

$this->security = $security;
$this->formComponent = $formComponent;
$this->orderShopStore = $orderShopStore;
$this->priceSolver = $priceSolver;
$this->sectionStore = $sectionStore;
$this->ticketSolver = $ticketSolver;
}

public function buildForm(FormBuilderInterface $builder, array $options)
@@ -99,7 +101,7 @@ class TicketFormType extends SovTicketFormType
[
'label' => 'Type',
'choices' => $this->translatorAdmin->transChoices(
TicketSolver::getTypeChoices(),
$this->ticketSolver->getTypeChoices('frontend'),
'Ticket',
'type'
),

+ 1
- 1
Solver/Ticket/TicketSolver.php Datei anzeigen

@@ -7,7 +7,7 @@ use Lc\SovBundle\Solver\Ticket\TicketSolver as SovTicketSolver;

class TicketSolver extends SovTicketSolver
{
public static function getTypeChoices(): array
public function getTypeChoices($context = 'backend'): array
{
$choices = parent::getTypeChoices();
$choicesProduct = [

Laden…
Abbrechen
Speichern