Since $counter is declared private, accessing it with static will lead to errors in possible sub-classes; you can either use self, or increase the visibility of $counter to at least protected.
Loading history...
23
}
24
25
134
return $this->id;
26
}
27
28
/**
29
* Set the Id of the widget.
30
*
31
* @param string $value
32
*
33
* @return $this
34
*/
35
1
public function id(string $value): self
36
{
37
1
$new = clone $this;
38
1
$new->id = $value;
39
40
1
return $new;
41
}
42
43
/**
44
* Counter used to generate {@see id} for widgets.
45
*
46
* @param int $value
47
*/
48
124
public static function counter(int $value): void
49
{
50
124
self::$counter = $value;
51
124
}
52
53
/**
54
* The prefix to the automatically generated widget IDs.