AuthorAdmin   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 4
dl 0
loc 38
ccs 0
cts 24
cp 0
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A configureListFields() 0 6 1
A configureFormFields() 0 9 1
A configureShowFields() 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
use Sonata\AdminBundle\Show\ShowMapper;
9
use Symfony\Component\Form\Extension\Core\Type\FileType;
10
use Vich\UploaderBundle\Form\Type\VichImageType;
11
12
/**
13
 * Nicolas Bastien <[email protected]>
14
 */
15
class AuthorAdmin extends AbstractAdmin
16
{
17
    /**
18
     * {@inheritdoc}
19
     */
20
    public function configureListFields(ListMapper $list)
21
    {
22
        $list
23
            ->addIdentifier('id')
24
        ;
25
    }
26
27
    /**
28
     * {@inheritdoc}
29
     */
30
    public function configureFormFields(FormMapper $form)
31
    {
32
        $form
33
            ->tab('tab.label_content')
34
                ->with('fieldset.label_general')
35
                ->end()
36
            ->end()
37
        ;
38
    }
39
40
    /**
41
     * {@inheritDoc}
42
     */
43
    protected function configureShowFields(ShowMapper $show)
44
    {
45
        $show
46
            ->tab('tab.label_content')
47
                ->with('fieldset.label_general')
48
                ->end()
49
            ->end()
50
        ;
51
    }
52
}
53