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...
25
}
26
27
167
return $this->id;
28
}
29
30
/**
31
* Set the Id of the widget.
32
*
33
* @param string $value
34
*
35
* @return self
36
*/
37
1
public function id(string $value): self
38
{
39
1
$new = clone $this;
40
1
$new->id = $value;
41
42
1
return $new;
43
}
44
45
/**
46
* Counter used to generate {@see id} for widgets.
47
*
48
* @param int $value
49
*/
50
156
public static function counter(int $value): void
51
{
52
156
self::$counter = $value;
53
}
54
55
/**
56
* The prefix to the automatically generated widget IDs.