Completed
Push — master ( 57a1ef...d5f3e2 )
by Ivo
02:52
created

ContentType::getBlockPrefix()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 1 Features 1
Metric Value
c 1
b 1
f 1
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
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
    public function buildForm(FormBuilderInterface $builder, array $options)
28
    {
29
        $builder->add('text');
30
    }
31
32
    /**
33
     * {@inheritdoc}
34
     */
35
    public function configureOptions(OptionsResolver $resolver)
36
    {
37
        $resolver->setDefaults(
38
            [
39
                'data_class'      => Content::class,
40
                'csrf_protection' => false,
41
                'method'          => 'PUT',
42
            ]
43
        );
44
    }
45
46
    /**
47
     * {@inheritdoc}
48
     */
49
    public function getBlockPrefix()
50
    {
51
        return '';
52
    }
53
}
54