StringBlockType::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 StringBlockType 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.string_block.name',
19
            ])
20
            ->add('body', TextType::class, [
21
                'label' => 'lakion_cms.form.string_block.body',
22
            ])
23
        ;
24
    }
25
26
    /**
27
     * {@inheritdoc}
28
     */
29
    public function getBlockPrefix()
30
    {
31
        return 'lakion_cms_string_block';
32
    }
33
}
34