Completed
Push — master ( 176635...e872ae )
by Julito
115:51 queued 84:14
created

SettingsFormFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 3
dl 0
loc 19
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A create() 0 13 1
1
<?php
2
/* For licensing terms, see /license.txt */
3
4
namespace Chamilo\CourseBundle\Form\Factory;
5
6
use Sylius\Bundle\SettingsBundle\Form\Factory\SettingsFormFactory as SyliusSettingsFormFactory;
7
8
/**
9
 * Class SettingsFormFactory
10
 * @package Chamilo\CourseBundle\Form\Factory
11
 */
12
class SettingsFormFactory extends SyliusSettingsFormFactory
13
{
14
    /**
15
     * {@inheritdoc}
16
     */
17
    public function create($namespace, $data = null, array $options = array())
18
    {
19
        $schema = $this->schemaRegistry->getSchema($namespace);
20
        $builder = $this->formFactory->createBuilder(
21
            'form',
22
            null,
23
            array('data_class' => null)
24
        );
25
26
        $schema->buildForm($builder);
27
28
        return $builder->getForm();
29
    }
30
}
31