19declare(strict_types=1);
48 'parameter' => $parameter,
58 return json_encode($this->structure);
75 public function node(
string $label, ?
int $parameter =
null, ?
int $lp =
null):
TOCBuilder
78 $toc =
new LSTOCBuilder($this, $this->command, $label, $parameter, $lp);
85 public function item(
string $label,
int $parameter, $state =
null,
bool $current =
false):
TOCBuilder
90 'parameter' => $parameter,
94 $this->structure[
'childs'][] = $item;
end()
Finish building the TOC.ControlBuilder|TOCBuilder depending on the nesting level.
node(string $label, ?int $parameter=null, ?int $lp=null)
Build a sub tree in the TOC.If a parameter is provided, the node in the TOC can be accessed itself....
__construct($parent, string $command, string $label='', ?int $parameter=null, $state=null)
LSControlBuilder|LSTOCBuilder $parent.
item(string $label, int $parameter, $state=null, bool $current=false)
Build an entry in the TOC.The parameter will be appended to the command when updating the state....
Build a nested table of contents for the view.