CategoryAdmin   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 3
dl 0
loc 25
ccs 0
cts 15
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A configureListFields() 0 6 1
A configureFormFields() 0 9 1
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