TreeBrowserInterface

interface \TYPO3\CMS\Core\Console\TreeBrowser\TreeBrowserInterface

Lets a person browse a tree in the terminal and returns the selection.

EXT:core only ships a stub that cannot browse, the browser itself comes with EXT:lowlevel, so commands can offer an interactive mode without depending on it.

Table of Contents

Constants

EXIT_INTERRUPTED  : int = 130
Exit code of a command whose browser was left with Ctrl-C, as for interrupted programs.

Methods

problem()  : string|null
Why the browser cannot run here, or null. Commands exit with code 2 if there is a reason.
run()  : BrowserResult|null
Runs until the browser is left with "q", or returns null after Ctrl-C.

Constants

EXIT_INTERRUPTED

Exit code of a command whose browser was left with Ctrl-C, as for interrupted programs.

public int EXIT_INTERRUPTED = 130

Methods

problem()

Why the browser cannot run here, or null. Commands exit with code 2 if there is a reason.

public problem(InputInterface $input, OutputInterface $output[, string $alternative = '' ]) : string|null

Parameters

$input : InputInterface
$output : OutputInterface
$alternative : string = ''

appended to the reason, e.g. the options to use instead

Return values

string|null

run()

Runs until the browser is left with "q", or returns null after Ctrl-C.

public run(BrowsableTree $tree, InputInterface $input, OutputInterface $output[, array<int, string|int> $start = [] ][, bool $labels = false ][, string $language = 'en' ]) : BrowserResult|null

Call it only if problem() returned null.

Parameters

$tree : BrowsableTree
$input : InputInterface
$output : OutputInterface
$start : array<int, string|int> = []

keys of the level to start on, top-level identifier first

$labels : bool = false

whether label references start translated, if the tree supports labels

$language : string = 'en'

the language labels are translated to

Return values

BrowserResult|null
On this page