Completed
Push — master ( 366a32...09b547 )
by Paweł
87:56 queued 75:08
created

PriceRangeFilterConfigurationType::buildForm()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 7
rs 9.4285
cc 1
eloc 4
nc 1
nop 2
1
<?php
2
3
/*
4
 * This file is part of the Sylius package.
5
 *
6
 * (c) Paweł Jędrzejewski
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Sylius\Bundle\PromotionBundle\Form\Type\Filter;
13
14
use Symfony\Component\Form\AbstractType;
15
use Symfony\Component\Form\FormBuilderInterface;
16
use Symfony\Component\Validator\Constraints\Type;
17
18
/**
19
 * @author Viorel Craescu <[email protected]>
20
 * @author Gabi Udrescu <[email protected]>
21
 * @author Łukasz Chruściel <[email protected]>
22
 */
23
class PriceRangeFilterConfigurationType extends AbstractType
24
{
25
    /**
26
     * {@inheritdoc}
27
     */
28
    public function buildForm(FormBuilderInterface $builder, array $options)
29
    {
30
        $builder
31
            ->add('min', 'sylius_money', ['required' => false, 'constraints' => [new Type(['type' => 'numeric'])]])
32
            ->add('max', 'sylius_money', ['required' => false, 'constraints' => [new Type(['type' => 'numeric'])]])
33
        ;
34
    }
35
36
    /**
37
     * {@inheritdoc}
38
     */
39
    public function getName()
40
    {
41
        return 'sylius_promotion_action_filter_price_range_configuration';
42
    }
43
}
44