1 | <?php |
||
2 | /* For licensing terms, see /license.txt */ |
||
3 | |||
4 | namespace Chamilo\ThemeBundle\Model; |
||
5 | |||
6 | /** |
||
7 | * Class TaskModel. |
||
8 | * |
||
9 | * @package Chamilo\ThemeBundle\Model |
||
10 | */ |
||
11 | class TaskModel implements TaskInterface |
||
12 | { |
||
13 | const COLOR_AQUA = 'aqua'; |
||
14 | |||
15 | const COLOR_GREEN = 'green'; |
||
16 | |||
17 | const COLOR_RED = 'red'; |
||
18 | |||
19 | const COLOR_YELLOW = 'yellow'; |
||
20 | |||
21 | /** |
||
22 | * @var int |
||
23 | */ |
||
24 | protected $progress; |
||
25 | |||
26 | /** |
||
27 | * @var string |
||
28 | */ |
||
29 | protected $color = self::COLOR_AQUA; |
||
30 | |||
31 | /** |
||
32 | * @var null |
||
33 | */ |
||
34 | protected $title; |
||
35 | |||
36 | /** |
||
37 | * @param null $title |
||
0 ignored issues
–
show
Documentation
Bug
introduced
by
Loading history...
|
|||
38 | * @param int $progress |
||
39 | * @param string $color |
||
40 | */ |
||
41 | public function __construct($title = null, $progress = 0, $color = self::COLOR_AQUA) |
||
42 | { |
||
43 | $this->color = $color; |
||
44 | $this->progress = $progress; |
||
45 | $this->title = $title; |
||
46 | } |
||
47 | |||
48 | /** |
||
49 | * @param string $color |
||
50 | * |
||
51 | * @return $this |
||
52 | */ |
||
53 | public function setColor($color) |
||
54 | { |
||
55 | $this->color = $color; |
||
56 | |||
57 | return $this; |
||
58 | } |
||
59 | |||
60 | /** |
||
61 | * @return string |
||
62 | */ |
||
63 | public function getColor() |
||
64 | { |
||
65 | return $this->color; |
||
66 | } |
||
67 | |||
68 | /** |
||
69 | * @param mixed $progress |
||
70 | * |
||
71 | * @return $this |
||
72 | */ |
||
73 | public function setProgress($progress) |
||
74 | { |
||
75 | $this->progress = $progress; |
||
76 | |||
77 | return $this; |
||
78 | } |
||
79 | |||
80 | /** |
||
81 | * @return mixed |
||
82 | */ |
||
83 | public function getProgress() |
||
84 | { |
||
85 | return $this->progress; |
||
86 | } |
||
87 | |||
88 | /** |
||
89 | * @param mixed $title |
||
90 | * |
||
91 | * @return $this |
||
92 | */ |
||
93 | public function setTitle($title) |
||
94 | { |
||
95 | $this->title = $title; |
||
96 | |||
97 | return $this; |
||
98 | } |
||
99 | |||
100 | /** |
||
101 | * @return mixed |
||
102 | */ |
||
103 | public function getTitle() |
||
104 | { |
||
105 | return $this->title; |
||
106 | } |
||
107 | |||
108 | public function getIdentifier() |
||
109 | { |
||
110 | return $this->title; |
||
111 | } |
||
112 | } |
||
113 |