StringBlockType   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 25
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A buildForm() 0 11 1
A getBlockPrefix() 0 4 1
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