|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/* |
|
4
|
|
|
* This file has been created by developers from BitBag. |
|
5
|
|
|
* Feel free to contact us once you face any issues or want to start |
|
6
|
|
|
* another great project. |
|
7
|
|
|
* You can find more information about us on https://bitbag.shop and write us |
|
8
|
|
|
* an email on [email protected]. |
|
9
|
|
|
*/ |
|
10
|
|
|
|
|
11
|
|
|
declare(strict_types=1); |
|
12
|
|
|
|
|
13
|
|
|
namespace BitBag\SyliusInvoicingPlugin\Form\Type; |
|
14
|
|
|
|
|
15
|
|
|
use Sylius\Bundle\ResourceBundle\Form\Type\AbstractResourceType; |
|
16
|
|
|
use Symfony\Component\Form\Extension\Core\Type\CountryType; |
|
17
|
|
|
use Symfony\Component\Form\Extension\Core\Type\TextType; |
|
18
|
|
|
use Symfony\Component\Form\FormBuilderInterface; |
|
19
|
|
|
|
|
20
|
|
|
final class CompanyDataType extends AbstractResourceType |
|
21
|
|
|
{ |
|
22
|
|
|
public function buildForm(FormBuilderInterface $builder, array $options): void |
|
23
|
|
|
{ |
|
24
|
|
|
$builder |
|
25
|
|
|
->add('name', TextType::class, [ |
|
26
|
|
|
'label' => 'bitbag_sylius_invoicing_plugin.ui.company_name', |
|
27
|
|
|
]) |
|
28
|
|
|
->add('street', TextType::class, [ |
|
29
|
|
|
'label' => 'bitbag_sylius_invoicing_plugin.ui.street', |
|
30
|
|
|
]) |
|
31
|
|
|
->add('city', TextType::class, [ |
|
32
|
|
|
'label' => 'bitbag_sylius_invoicing_plugin.ui.city', |
|
33
|
|
|
]) |
|
34
|
|
|
->add('postcode', TextType::class, [ |
|
35
|
|
|
'label' => 'bitbag_sylius_invoicing_plugin.ui.postcode', |
|
36
|
|
|
]) |
|
37
|
|
|
->add('countryCode', CountryType::class, [ |
|
38
|
|
|
'label' => 'bitbag_sylius_invoicing_plugin.ui.country', |
|
39
|
|
|
]) |
|
40
|
|
|
->add('vatNumber', TextType::class, [ |
|
41
|
|
|
'label' => 'bitbag_sylius_invoicing_plugin.ui.vat_number', |
|
42
|
|
|
]) |
|
43
|
|
|
->add('seller', TextType::class, [ |
|
44
|
|
|
'label' => 'bitbag_sylius_invoicing_plugin.ui.seller', |
|
45
|
|
|
]) |
|
46
|
|
|
; |
|
47
|
|
|
} |
|
48
|
|
|
|
|
49
|
|
|
public function getBlockPrefix(): string |
|
50
|
|
|
{ |
|
51
|
|
|
return 'bitbag_sylius_invoicing_plugin_company_data'; |
|
52
|
|
|
} |
|
53
|
|
|
} |
|
54
|
|
|
|