tables()
tables() : array<string,mixed>
Declares Strata's tables and how they join.
Returns
arrayViews data, keyed by table name.
Exposes every table Strata writes to Views.
The reason to do this rather than build bespoke report pages: an operator's questions about a backup are not knowable in advance. "Which commits did this user cause last Tuesday", "which frames have one reference and are over a megabyte", "which restores were refused and why" - each of those is a view somebody can build in a minute and none of them is worth a controller.
Relationships are declared where they are real. A commit's parent is a commit, an operation belongs to a commit, a frame belongs to a pack. Declaring those lets a view join them; not declaring them would leave an operator with ten unrelated tables and no way to ask a question that spans two.
The payload columns are exposed but not rendered by default. A journal payload is the captured
value itself, which is exactly the thing view strata payloads gates, so a view that shows it needs
that permission and the default views do not include it.
table(string $table, string|object $title, string|object $help, string $field) : array<string,mixed>
The table declaration every one of these shares.
| string | $table | The table name. |
| string|object | $title | Human title. |
| string|object | $help | What the table holds. |
| string | $field | The column a view uses as its base field. |
The opening of a views data array.