CategoryAdmin::configureFormFields()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 9
ccs 0
cts 9
cp 0
rs 9.9666
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 2
1
<?php
2
3
namespace Smart\ContentBundle\Admin;
4
5
use Smart\SonataBundle\Admin\AbstractAdmin;
6
use Sonata\AdminBundle\Datagrid\ListMapper;
7
use Sonata\AdminBundle\Form\FormMapper;
8
9
/**
10
 * Nicolas Bastien <[email protected]>
11
 */
12
class CategoryAdmin extends AbstractAdmin
13
{
14
    /**
15
     * {@inheritdoc}
16
     */
17
    public function configureListFields(ListMapper $list)
18
    {
19
        $list
20
            ->addIdentifier('id')
21
        ;
22
    }
23
24
    /**
25
     * {@inheritdoc}
26
     */
27
    public function configureFormFields(FormMapper $form)
28
    {
29
        $form
30
            ->tab('tab.label_content')
31
                ->with('fieldset.label_general', ['class' => 'col-md-8'])
32
                ->end()
33
            ->end()
34
        ;
35
    }
36
}
37