‪TYPO3CMS  10.4
TYPO3\CMS\Backend\View\ArrayBrowser Class Reference
Inheritance diagram for TYPO3\CMS\Backend\View\ArrayBrowser:
TYPO3\CMS\Lowlevel\Utility\ArrayBrowser

Public Member Functions

 __construct (Route $route=null)
 
string tree ($array, $positionKey)
 
array getSearchKeys ($keyArr, $depth_in, $searchString, $keyArray)
 
array depthKeys ($arr, $settings)
 

Public Attributes

bool $expAll = false
 
array $depthKeys = array( )
 
array $searchKeys = array( )
 
int $regexMode = 0
 
bool $searchKeysToo = true
 

Protected Attributes

UriBuilder $uriBuilder
 
Route null $route
 

Detailed Description

Class for displaying an array as a tree which can collapse / expand.

See the extension 'lowlevel' / config (Backend module 'Tools > Configuration')

just a helper class for internal usage.

Definition at line 30 of file ArrayBrowser.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Backend\View\ArrayBrowser::__construct ( Route  $route = null)

Definition at line 72 of file ArrayBrowser.php.

References TYPO3\CMS\Backend\View\ArrayBrowser\$route.

Member Function Documentation

◆ depthKeys()

array TYPO3\CMS\Backend\View\ArrayBrowser::depthKeys (   $arr,
  $settings 
)

Function modifying the depthKey array

Parameters
array$arr‪Array with instructions to open/close nodes.
array$settings‪Input depth_key array
Returns
‪array Output depth_key array with entries added/removed based on $arr

Definition at line 178 of file ArrayBrowser.php.

Referenced by TYPO3\CMS\Backend\View\ArrayBrowser\tree().

◆ getSearchKeys()

array TYPO3\CMS\Backend\View\ArrayBrowser::getSearchKeys (   $keyArr,
  $depth_in,
  $searchString,
  $keyArray 
)

Creates an array with "depthKeys" which will expand the array to show the search results

Parameters
array$keyArr‪The array to search for the value
string$depth_in‪Depth string - blank for first call (will build up during recursive calling creating an id of the position: [key1].[key2].[key3]
string$searchString‪The string to search for
array$keyArray‪Key array, for first call pass empty array
Returns
‪array

Definition at line 137 of file ArrayBrowser.php.

◆ tree()

string TYPO3\CMS\Backend\View\ArrayBrowser::tree (   $array,
  $positionKey 
)

Set var name here if you want links to the variable name.

Make browsable tree Before calling this function you may want to set some of the internal vars like depthKeys and regexMode.

Parameters
array$array‪The array to display
string$positionKey‪Key-position id. Build up during recursive calls - [key1].[key2].[key3] - and so on.
Returns
‪string HTML for the tree

Definition at line 89 of file ArrayBrowser.php.

References TYPO3\CMS\Backend\View\ArrayBrowser\$expAll, $output, and TYPO3\CMS\Backend\View\ArrayBrowser\depthKeys().

Member Data Documentation

◆ $depthKeys

array TYPO3\CMS\Backend\View\ArrayBrowser::$depthKeys = array( )

If set, the variable keys are not linked.

Definition at line 40 of file ArrayBrowser.php.

◆ $expAll

bool TYPO3\CMS\Backend\View\ArrayBrowser::$expAll = false

Definition at line 34 of file ArrayBrowser.php.

Referenced by TYPO3\CMS\Backend\View\ArrayBrowser\tree().

◆ $regexMode

int TYPO3\CMS\Backend\View\ArrayBrowser::$regexMode = 0

If set, the values are truncated with "..." appended if longer than a certain length.

Definition at line 54 of file ArrayBrowser.php.

◆ $route

Route null TYPO3\CMS\Backend\View\ArrayBrowser::$route
protected

If null then there are no links set.

Definition at line 70 of file ArrayBrowser.php.

Referenced by TYPO3\CMS\Backend\View\ArrayBrowser\__construct().

◆ $searchKeys

array TYPO3\CMS\Backend\View\ArrayBrowser::$searchKeys = array( )

Array defining which keys to expand. Typically set from outside from some session variable - otherwise the array will collapse.

Definition at line 47 of file ArrayBrowser.php.

◆ $searchKeysToo

bool TYPO3\CMS\Backend\View\ArrayBrowser::$searchKeysToo = true

If set, search for string with regex, otherwise stristr()

Definition at line 60 of file ArrayBrowser.php.

◆ $uriBuilder

UriBuilder TYPO3\CMS\Backend\View\ArrayBrowser::$uriBuilder
protected

Definition at line 64 of file ArrayBrowser.php.