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

SettingsFormFactory::create()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 8
nc 1
nop 3
dl 0
loc 13
rs 9.4285
c 0
b 0
f 0
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