Action::setLabel()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace AtDataGrid\Toolbar;
4
5
class Action
6
{
7
    private $name;
8
    private $action;
9
    private $label;
10
    private $confirm = false;
11
    private $confirmMessage = 'Are you sure?';
12
    private $class;
13
14
    /**
15
     * @param $name
16
     */
17
    public function __construct($name)
18
    {
19
        $this->setName($name);
20
    }
21
22
    /**
23
     * @return mixed
24
     */
25
    public function getAction()
26
    {
27
        return $this->action;
28
    }
29
30
    /**
31
     * @param mixed $action
32
     */
33
    public function setAction($action)
34
    {
35
        $this->action = $action;
36
    }
37
38
    /**
39
     * @return mixed
40
     */
41
    public function getClass()
42
    {
43
        return $this->class;
44
    }
45
46
    /**
47
     * @param mixed $class
48
     */
49
    public function setClass($class)
50
    {
51
        $this->class = $class;
52
    }
53
54
    /**
55
     * @return boolean
56
     */
57
    public function isConfirm()
58
    {
59
        return $this->confirm;
60
    }
61
62
    /**
63
     * @param boolean $confirm
64
     */
65
    public function setConfirm($confirm)
66
    {
67
        $this->confirm = $confirm;
68
    }
69
70
    /**
71
     * @return string
72
     */
73
    public function getConfirmMessage()
74
    {
75
        return $this->confirmMessage;
76
    }
77
78
    /**
79
     * @param string $confirmMessage
80
     */
81
    public function setConfirmMessage($confirmMessage)
82
    {
83
        $this->confirmMessage = $confirmMessage;
84
    }
85
86
    /**
87
     * @return mixed
88
     */
89
    public function getLabel()
90
    {
91
        return $this->label;
92
    }
93
94
    /**
95
     * @param mixed $label
96
     */
97
    public function setLabel($label)
98
    {
99
        $this->label = $label;
100
    }
101
102
    /**
103
     * @return mixed
104
     */
105
    public function getName()
106
    {
107
        return $this->name;
108
    }
109
110
    /**
111
     * @param mixed $name
112
     */
113
    public function setName($name)
114
    {
115
        $this->name = $name;
116
    }
117
}