Quellcode durchsuchen

Modèle Section

feature/module_traiteur_v1
Fab vor 3 Jahren
Ursprung
Commit
34ea600618
1 geänderte Dateien mit 17 neuen und 17 gelöschten Zeilen
  1. +17
    -17
      ShopBundle/Form/Backend/ProductFamily/ProductType.php

+ 17
- 17
ShopBundle/Form/Backend/ProductFamily/ProductType.php Datei anzeigen

$this->em = $entityManager; $this->em = $entityManager;
$this->utils = $utils; $this->utils = $utils;
} }

public function buildForm(FormBuilderInterface $builder, array $options) public function buildForm(FormBuilderInterface $builder, array $options)
{ {




$builder->add('title', TextType::class, array( $builder->add('title', TextType::class, array(
"required" => false "required" => false
)) ;

));


$builder->add('quantity', NumberType::class, array( $builder->add('quantity', NumberType::class, array(
'label' => 'Quantité', 'label' => 'Quantité',
'required'=>false,
'required' => false,
'attr' => [ 'attr' => [
'append_html' => 'g' 'append_html' => 'g'
] ]
$unitClass = $this->em->getClassMetadata(UnitInterface::class)->getName(); $unitClass = $this->em->getClassMetadata(UnitInterface::class)->getName();


$builder->add('unit', EntityType::class, array( $builder->add('unit', EntityType::class, array(
'class'=> $unitClass,
'class' => $unitClass,
'data' => 0, 'data' => 0,
'required'=>false,
'required' => false,
'choice_attr' => function ($choice) { 'choice_attr' => function ($choice) {
return [ return [
'data-unit-reference' => $choice->getUnitReference(), 'data-unit-reference' => $choice->getUnitReference(),


$builder->add('buyingPrice', NumberType::class, array( $builder->add('buyingPrice', NumberType::class, array(
'label' => 'Prix d\'achat', 'label' => 'Prix d\'achat',
'required'=>false
'required' => false
)); ));


$builder->add('buyingPriceWithTax', NumberType::class, array( $builder->add('buyingPriceWithTax', NumberType::class, array(


$builder->add('buyingPriceByRefUnit', NumberType::class, array( $builder->add('buyingPriceByRefUnit', NumberType::class, array(
'label' => 'Prix d\'achat', 'label' => 'Prix d\'achat',
'required'=>false
'required' => false
)); ));


$builder->add('buyingPriceByRefUnitWithTax', NumberType::class, array( $builder->add('buyingPriceByRefUnitWithTax', NumberType::class, array(
)); ));
$builder->add('multiplyingFactor', NumberType::class, array( $builder->add('multiplyingFactor', NumberType::class, array(
'label' => 'Coefficiant de multiplication', 'label' => 'Coefficiant de multiplication',
'mapped'=>false,
'required'=>false
'mapped' => false,
'required' => false
)); ));


$builder->add('priceByRefUnit', NumberType::class, array( $builder->add('priceByRefUnit', NumberType::class, array(
'required'=>false
'required' => false
)); ));


$builder->add('priceByRefUnitWithTax', NumberType::class, array( $builder->add('priceByRefUnitWithTax', NumberType::class, array(
$builder->add('position', HiddenType::class); $builder->add('position', HiddenType::class);
$builder->add('status', HiddenType::class); $builder->add('status', HiddenType::class);
$builder->add('exportTitle', TextType::class, array( $builder->add('exportTitle', TextType::class, array(
'required' =>false
'required' => false
)); ));
$builder->add('exportNote', TextType::class, array( $builder->add('exportNote', TextType::class, array(
'required' =>false
'required' => false
)); ));
$reductionCartClass = $this->em->getClassMetadata(ReductionCartInterface::class)->getName(); $reductionCartClass = $this->em->getClassMetadata(ReductionCartInterface::class)->getName();
$reductionCartRepo = $this->em->getRepository(ReductionCartInterface::class); $reductionCartRepo = $this->em->getRepository(ReductionCartInterface::class);


/* $builder->add('giftVoucherReductionCart', EntityType::class, array(
'required' =>false,
'class'=> $reductionCartClass,
'choices' => $reductionCartRepo->getOnlineReductionCart(),
));*/
/* $builder->add('giftVoucherReductionCart', EntityType::class, array(
'required' =>false,
'class'=> $reductionCartClass,
'choices' => $reductionCartRepo->getOnlineReductionCart(),
));*/


} }



Laden…
Abbrechen
Speichern