Completed
Branch master (86eea3)
by Steevan
05:52
created

FileOptionsBuilder::removeMultiple()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace steevanb\SymfonyFormOptionsBuilder\OptionsBuilder;
4
5
use steevanb\SymfonyFormOptionsBuilder\Behavior\DataClassTrait;
6
use steevanb\SymfonyFormOptionsBuilder\Behavior\LabelFormatTrait;
7
use steevanb\SymfonyFormOptionsBuilder\Behavior\OptionAccessorsTrait;
8
use Symfony\Component\Form\Extension\Core\Type\FileType;
9
10
class FileOptionsBuilder extends AbstractOptionsBuilder
11
{
12
    use OptionAccessorsTrait;
13
    /** @link http://symfony.com/doc/current/reference/forms/types/file.html#data-class */
14
    use DataClassTrait;
15
    /** @link http://symfony.com/doc/current/reference/forms/types/file.html#label-format */
16
    use LabelFormatTrait;
17
18
    /**
19
     * @return string
20
     */
21
    public static function getBuilderType()
22
    {
23
        return FileType::class;
24
    }
25
26
    /**
27
     * @param bool $multiple
28
     * @return $this
29
     * @link http://symfony.com/doc/current/reference/forms/types/file.html#multiple
30
     */
31
    public function setMultiple($multiple = true)
32
    {
33
        return $this->setOption('multipel', $multiple);
34
    }
35
36
    /**
37
     * @return bool|null
38
     */
39
    public function getMultiple()
40
    {
41
        return $this->getOption('multiple');
42
    }
43
44
    /**
45
     * @return $this
46
     */
47
    public function removeMultiple()
48
    {
49
        return $this->removeOption('multiple');
50
    }
51
52
    /**
53
     * @param array $mapping
54
     * @return $this
55
     * @link http://symfony.com/doc/current/reference/forms/types/file.html#error-mapping
56
     */
57
    public function setErrorMapping(array $mapping)
58
    {
59
        return $this->setOption('error_mapping', $mapping);
60
    }
61
62
    /**
63
     * @return mixed
64
     */
65
    public function getErrorMapping()
66
    {
67
        return $this->getOption('error_mapping');
68
    }
69
70
    /**
71
     * @return $this
72
     */
73
    public function removeErrorMapping()
74
    {
75
        return $this->removeOption('error_mapping');
76
    }
77
}
78