Completed
Push — 1.x ( 815042...ac7482 )
by
unknown
06:00
created

DatagridField::getPosition()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace KunicMarko\SonataAnnotationBundle\Annotation;
6
7
/**
8
 * @Annotation
9
 * @Target("PROPERTY")
10
 *
11
 * @author Marko Kunic <[email protected]>
12
 */
13
class DatagridField extends AbstractField
14
{
15
    /**
16
     * @var array
17
     */
18
    public $filterOptions = [];
19
20
    /**
21
     * @var string
22
     */
23
    public $fieldType;
24
25
    /**
26
     * @var array
27
     */
28
    public $fieldOptions = [];
29
30
    /**
31
     * @var int
32
     */
33
    public $position;
34
35
    public function getPosition(): int
36
    {
37
        return $this->position;
38
    }
39
40
    public function hasPosition(): bool
41
    {
42
        return null !== $this->position;
43
    }
44
45
    public function getSettings(): array
46
    {
47
        return [
48
            $this->type,
49
            $this->filterOptions,
50
            $this->fieldType,
51
            $this->fieldOptions,
52
            $this->fieldDescriptionOptions
53
        ];
54
    }
55
}
56