1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* |
4
|
|
|
* This file is part of the bootstrap-bundle package. |
5
|
|
|
* |
6
|
|
|
* (c) 2019 WEBEWEB |
7
|
|
|
* |
8
|
|
|
* For the full copyright and license information, please view the LICENSE |
9
|
|
|
* file that was distributed with this source code. |
10
|
|
|
*/ |
11
|
|
|
|
12
|
|
|
namespace WBW\Bundle\BootstrapBundle\Button; |
13
|
|
|
|
14
|
|
|
/** |
15
|
|
|
* Button factory. |
16
|
|
|
* |
17
|
|
|
* @author webeweb <https://github.com/webeweb/> |
18
|
|
|
* @package WBW\Bundle\BootstrapBundle\Button |
19
|
|
|
*/ |
20
|
|
|
class ButtonFactory { |
21
|
|
|
|
22
|
|
|
/** |
23
|
|
|
* Creates a new danger button. |
24
|
|
|
* |
25
|
|
|
* @return ButtonInterface Returns the danger button. |
26
|
|
|
*/ |
27
|
|
|
public static function newDangerButton() { |
28
|
|
|
return new DangerButton(); |
29
|
|
|
} |
30
|
|
|
|
31
|
|
|
/** |
32
|
|
|
* Creates a new default button. |
33
|
|
|
* |
34
|
|
|
* @return ButtonInterface Returns the default button. |
35
|
|
|
*/ |
36
|
|
|
public static function newDefaultButton() { |
37
|
|
|
return new DefaultButton(); |
38
|
|
|
} |
39
|
|
|
|
40
|
|
|
/** |
41
|
|
|
* Creates a new info button. |
42
|
|
|
* |
43
|
|
|
* @return ButtonInterface Returns the info button. |
44
|
|
|
*/ |
45
|
|
|
public static function newInfoButton() { |
46
|
|
|
return new InfoButton(); |
47
|
|
|
} |
48
|
|
|
|
49
|
|
|
/** |
50
|
|
|
* Creates a new primary button. |
51
|
|
|
* |
52
|
|
|
* @return ButtonInterface Returns the primary button. |
53
|
|
|
*/ |
54
|
|
|
public static function newPrimaryButton() { |
55
|
|
|
return new PrimaryButton(); |
56
|
|
|
} |
57
|
|
|
|
58
|
|
|
/** |
59
|
|
|
* Creates a new success button. |
60
|
|
|
* |
61
|
|
|
* @return ButtonInterface Returns the success button. |
62
|
|
|
*/ |
63
|
|
|
public static function newSuccessButton() { |
64
|
|
|
return new SuccessButton(); |
65
|
|
|
} |
66
|
|
|
|
67
|
|
|
/** |
68
|
|
|
* Creates a new warning button. |
69
|
|
|
* |
70
|
|
|
* @return ButtonInterface Returns the warning button. |
71
|
|
|
*/ |
72
|
|
|
public static function newWarningButton() { |
73
|
|
|
return new WarningButton(); |
74
|
|
|
} |
75
|
|
|
} |
76
|
|
|
|