MediaTranslationType::getBlockPrefix()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
/*
4
 * This file was created by developers working at BitBag
5
 * Do you need more information about us and what we do? Visit our https://bitbag.io website!
6
 * We are hiring developers from all over the world. Join us and start your new, exciting adventure and become part of us: https://bitbag.io/career
7
*/
8
9
declare(strict_types=1);
10
11
namespace BitBag\SyliusCmsPlugin\Form\Type\Translation;
12
13
use BitBag\SyliusCmsPlugin\Form\Type\WysiwygType;
14
use Sylius\Bundle\ResourceBundle\Form\Type\AbstractResourceType;
15
use Symfony\Component\Form\Extension\Core\Type\TextType;
16
use Symfony\Component\Form\FormBuilderInterface;
17
18
final class MediaTranslationType extends AbstractResourceType
19
{
20
    public function buildForm(FormBuilderInterface $builder, array $options): void
21
    {
22
        $builder
23
            ->add('name', TextType::class, [
24
                'label' => 'bitbag_sylius_cms_plugin.ui.name',
25
                'required' => false,
26
            ])
27
            ->add('alt', TextType::class, [
28
                'label' => 'bitbag_sylius_cms_plugin.ui.alt',
29
                'required' => false,
30
            ])
31
            ->add('link', TextType::class, [
32
                'label' => 'bitbag_sylius_cms_plugin.ui.link',
33
                'required' => false,
34
            ])
35
            ->add('content', WysiwygType::class, ['required' => false])
36
        ;
37
    }
38
39
    public function getBlockPrefix(): string
40
    {
41
        return 'bitbag_sylius_cms_plugin_media_translation';
42
    }
43
}
44