Completed
Push — master ( 6783c1...bae055 )
by Alexander
06:16
created

Action::setUrl()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace AtDataGrid\Row;
4
5
class Action
6
{
7
    use DisablableTrait;
8
9
    private $name;
10
    private $url;
11
    private $routeName;
12
    private $routeParams = [];
13
    private $label;
14
    private $confirm = false;
15
    private $confirmMessage = 'Are you sure?';
16
    private $bulk = true;
17
    private $button = false;
18
    private $class;
19
20
    /**
21
     * @param $name
22
     */
23
    public function __construct($name)
24
    {
25
        $this->setName($name);
26
    }
27
28
    /**
29
     * @return mixed
30
     */
31
    public function getUrl()
32
    {
33
        return $this->url;
34
    }
35
36
    /**
37
     * @param mixed $url
38
     */
39
    public function setUrl($url)
40
    {
41
        $this->url = $url;
42
    }
43
44
    /**
45
     * @return boolean
46
     */
47
    public function isBulk()
48
    {
49
        return $this->bulk;
50
    }
51
52
    /**
53
     * @param boolean $bulk
54
     */
55
    public function setBulk($bulk)
56
    {
57
        $this->bulk = $bulk;
58
    }
59
60
    /**
61
     * @return boolean
62
     */
63
    public function isButton()
64
    {
65
        return $this->button;
66
    }
67
68
    /**
69
     * @param boolean $button
70
     */
71
    public function setButton($button)
72
    {
73
        $this->button = $button;
74
    }
75
76
    /**
77
     * @return mixed
78
     */
79
    public function getClass()
80
    {
81
        return $this->class;
82
    }
83
84
    /**
85
     * @param mixed $class
86
     */
87
    public function setClass($class)
88
    {
89
        $this->class = $class;
90
    }
91
92
    /**
93
     * @return boolean
94
     */
95
    public function isConfirm()
96
    {
97
        return $this->confirm;
98
    }
99
100
    /**
101
     * @param boolean $confirm
102
     */
103
    public function setConfirm($confirm)
104
    {
105
        $this->confirm = $confirm;
106
    }
107
108
    /**
109
     * @return string
110
     */
111
    public function getConfirmMessage()
112
    {
113
        return $this->confirmMessage;
114
    }
115
116
    /**
117
     * @param string $confirmMessage
118
     */
119
    public function setConfirmMessage($confirmMessage)
120
    {
121
        $this->confirmMessage = $confirmMessage;
122
    }
123
124
    /**
125
     * @return mixed
126
     */
127
    public function getLabel()
128
    {
129
        return $this->label;
130
    }
131
132
    /**
133
     * @param mixed $label
134
     */
135
    public function setLabel($label)
136
    {
137
        $this->label = $label;
138
    }
139
140
    /**
141
     * @return mixed
142
     */
143
    public function getName()
144
    {
145
        return $this->name;
146
    }
147
148
    /**
149
     * @param mixed $name
150
     */
151
    public function setName($name)
152
    {
153
        $this->name = $name;
154
    }
155
156
    /**
157
     * @return mixed
158
     */
159
    public function getRouteName()
160
    {
161
        return $this->routeName;
162
    }
163
164
    /**
165
     * @param mixed $routeName
166
     */
167
    public function setRouteName($routeName = null)
168
    {
169
        $this->routeName = $routeName;
170
    }
171
172
    /**
173
     * @return mixed
174
     */
175
    public function getRouteParams()
176
    {
177
        return $this->routeParams;
178
    }
179
180
    /**
181
     * @param mixed $routeParams
182
     */
183
    public function setRouteParams($routeParams = [])
184
    {
185
        $this->routeParams = $routeParams;
0 ignored issues
show
Documentation Bug introduced by
It seems like $routeParams of type * is incompatible with the declared type array of property $routeParams.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
186
    }
187
}