I18nType   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 23
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A buildForm() 0 15 1
A getName() 0 4 1
1
<?php
2
/*************************************************************************************/
3
/*      This file is part of the module FeatureType                                  */
4
/*                                                                                   */
5
/*      For the full copyright and license information, please view the LICENSE.txt  */
6
/*      file that was distributed with this source code.                             */
7
/*************************************************************************************/
8
9
namespace FeatureType\Form\Type;
10
11
use FeatureType\FeatureType;
12
use Symfony\Component\Form\AbstractType;
13
use Symfony\Component\Form\FormBuilderInterface;
14
use Thelia\Core\Translation\Translator;
15
16
/**
17
 * Class I18nType
18
 * @package FeatureType\Form\Type
19
 * @author Gilles Bourgeat <[email protected]>
20
 */
21
class I18nType extends AbstractType
22
{
23
    public function buildForm(FormBuilderInterface $builder, array $options)
24
    {
25
        $builder->add(
26
            'lang',
27
            'collection',
28
            array(
29
                'type' => new FeatureTypeType(),
30
                'allow_add'    => true,
31
                'allow_delete' => true,
32
                'options' => array(
33
                    'required' => true
34
                )
35
            )
36
        );
37
    }
38
39
    public function getName()
40
    {
41
        return 'lang';
42
    }
43
}
44