SetDefaultForm::buildForm()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 12
rs 9.8666
cc 1
nc 1
nop 0
1
<?php
2
/*************************************************************************************/
3
/*      This file is part of the RewriteUrl module for Thelia.                       */
4
/*                                                                                   */
5
/*      Copyright (c) OpenStudio                                                     */
6
/*      email : [email protected]                                                       */
7
/*      web : http://www.thelia.net                                                  */
8
/*                                                                                   */
9
/*      For the full copyright and license information, please view the LICENSE.txt  */
10
/*      file that was distributed with this source code.                             */
11
/*************************************************************************************/
12
13
namespace RewriteUrl\Form;
14
15
use Symfony\Component\Validator\Constraints\NotBlank;
16
use Thelia\Form\BaseForm;
17
18
/**
19
 * Class SetDefaultForm
20
 * @package RewriteUrl\Form
21
 * @author Vincent Lopes <[email protected]>
22
 */
23
class SetDefaultForm extends BaseForm
24
{
25
    /**
26
     * @return string
27
     */
28
    public function getName()
29
    {
30
        return "rewriteurl_setdefault_form";
31
    }
32
33
    protected function buildForm()
34
    {
35
        $this->formBuilder
36
            ->add(
37
                'rewrite-id',
38
                'text',
39
                array(
40
                    'constraints' => array(new NotBlank()),
41
                    'required' => true
42
                )
43
            );
44
    }
45
}
46