ContentType::getBlockPrefix()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
/*
4
 * This file is part of the Ivoaz ContentEditable bundle.
5
 *
6
 * (c) Ivo Azirjans <[email protected]>
7
 *
8
 * This source file is subject to the MIT license that is bundled
9
 * with this source code in the file LICENSE.
10
 */
11
12
namespace Ivoaz\Bundle\ContentEditableBundle\Form\Type;
13
14
use Ivoaz\Bundle\ContentEditableBundle\Form\Model\Content;
15
use Symfony\Component\Form\AbstractType;
16
use Symfony\Component\Form\FormBuilderInterface;
17
use Symfony\Component\OptionsResolver\OptionsResolver;
18
19
/**
20
 * @author Ivo Azirjans <[email protected]>
21
 */
22
class ContentType extends AbstractType
23
{
24
    /**
25
     * {@inheritdoc}
26
     */
27 2
    public function buildForm(FormBuilderInterface $builder, array $options)
28
    {
29 2
        $builder->add('text');
30 2
    }
31
32
    /**
33
     * {@inheritdoc}
34
     */
35 2
    public function configureOptions(OptionsResolver $resolver)
36
    {
37 2
        $resolver->setDefaults(
38
            [
39 2
                'data_class'      => Content::class,
40 2
                'csrf_protection' => false,
41 2
                'method'          => 'PUT',
42
            ]
43 2
        );
44 2
    }
45
46
    /**
47
     * {@inheritdoc}
48
     */
49 1
    public function getBlockPrefix()
50
    {
51 1
        return '';
52
    }
53
}
54