ArrayTree

final readonly class \TYPO3\CMS\Core\Console\TreeBrowser\ArrayTree

Implements
BrowsableTree

A BrowsableTree over data the command already holds, one top-level entry per key.

Table of Contents

Interfaces

BrowsableTree
What the interactive browser shows: a top level of named entries, each holding data that is loaded when the entry is needed. The browser turns objects into arrays and translates label references itself.

Methods

__construct()  : mixed
getEntries()  : array<int, BrowsableEntry>
getTitle()  : string
Heading of the top level, e.g. "Providers" or "Backend routes".
load()  : mixed
The data of one top-level entry, any value. Throws if the entry cannot be shown, the message of the exception is shown to the user.
supportsLabels()  : bool
Whether the data holds label references that "L" can switch to their translation.

Methods

__construct()

public __construct(string $title, array<string|int, mixed> $data[, array<string|int, string> $labels = [] ][, array<string|int, string> $groups = [] ][, bool $supportsLabels = false ]) : mixed

Parameters

$title : string
$data : array<string|int, mixed>

the keys are the top level in display order

$labels : array<string|int, string> = []

line above the preview, by top-level key

$groups : array<string|int, string> = []

group heading, by top-level key

$supportsLabels : bool = false

whether the data holds label references

getTitle()

Heading of the top level, e.g. "Providers" or "Backend routes".

public getTitle() : string

Return values

string

load()

The data of one top-level entry, any value. Throws if the entry cannot be shown, the message of the exception is shown to the user.

public load(string $identifier) : mixed

Parameters

$identifier : string

supportsLabels()

Whether the data holds label references that "L" can switch to their translation.

public supportsLabels() : bool

Return values

bool
On this page