RouteType::getBlockPrefix()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Lakion\CmsPlugin\Form\Type;
4
5
use Sylius\Bundle\ResourceBundle\Form\Type\AbstractResourceType;
6
use Symfony\Component\Form\Extension\Core\Type\TextType;
7
use Symfony\Component\Form\FormBuilderInterface;
8
9
final class RouteType extends AbstractResourceType
10
{
11
    /**
12
     * {@inheritdoc}
13
     */
14
    public function buildForm(FormBuilderInterface $builder, array $options = [])
15
    {
16
        $builder
17
            ->add('name', TextType::class, [
18
                'label' => 'lakion_cms.form.route.name',
19
            ])
20
            ->add('content', StaticContentChoiceType::class, [
21
                'label' => 'lakion_cms.form.route.content',
22
                'choice_label' => 'title',
23
                'choice_translation_domain' => false,
24
            ])
25
        ;
26
    }
27
28
    /**
29
     * {@inheritdoc}
30
     */
31
    public function getBlockPrefix()
32
    {
33
        return 'lakion_cms_route';
34
    }
35
}
36