StateToNode
Turns a plain state array into a TUI node tree. Total over its input: every shape a state array can carry becomes a node. Nothing is dropped for being an inconvenient shape — that decision is data loss, not formatting. It decides structure, never words. The two headers the key/value table needs are the caller's; everything else is derived from the data or left to the renderer's own defaults.
StateToNode::__construct()
public function __construct(string $fieldHeader = 'Field', string $valueHeader = 'Value'):Parameters
| Name | Type | Description |
|---|---|---|
| $fieldHeader | string | |
| $valueHeader | string |
StateToNode::map()
public function map(string $title, array $state): Milpa\Live\ValueObjects\Tui\TuiNodeMaps one section's state to a node tree.
Parameters
| Name | Type | Description |
|---|---|---|
| $title | string | |
| $state | array<string, mixed> |