The doc comment class-string<ButtonInterface> at position 0 could not be parsed: Unknown type name 'class-string' at position 0 in class-string<ButtonInterface>.
The doc comment class-string<ButtonInterface> at position 0 could not be parsed: Unknown type name 'class-string' at position 0 in class-string<ButtonInterface>.
Loading history...
49
*/
50
8
public function __construct(string $name, string $buttonClass = SubmitButton::class)
51
{
52
8
$this->name = $name;
53
8
$this->buttonClass = $buttonClass;
54
8
}
55
56
/**
57
* {@inheritdoc}
58
*/
59
1
public function value(string $value): ButtonBuilderInterface
60
{
61
1
$this->value = $value;
62
63
1
return $this;
64
}
65
66
/**
67
* {@inheritdoc}
68
*/
69
1
public function groups(array $groups): ButtonBuilderInterface
70
{
71
1
$this->groups = $groups;
72
73
1
return $this;
74
}
75
76
/**
77
* {@inheritdoc}
78
*/
79
8
public function buildButton(): ButtonInterface
80
{
81
8
return new $this->buttonClass($this->name, $this->value, $this->groups);