TYPO3  7.6
Public Member Functions | Public Attributes | List of all members
ArrayBrowser Class Reference

Public Member Functions

 tree ($array, $positionKey, $depthData=null)
 
 wrapValue ($theValue)
 
 wrapArrayKey ($label, $depth, $theValue)
 
 getSearchKeys ($keyArr, $depth_in, $searchString, $keyArray)
 
 depthKeys ($arr, $settings)
 

Public Attributes

 $expAll = false
 
 $dontLinkVar = false
 
 $depthKeys = array()
 
 $searchKeys = array()
 
 $fixedLgd = 1
 
 $regexMode = 0
 
 $searchKeysToo = false
 
 $varName = ''
 

Detailed Description

Class for displaying an array as a tree See the extension 'lowlevel' /config (Backend module 'Tools > Configuration')

Definition at line 25 of file ArrayBrowser.php.

Member Function Documentation

depthKeys (   $arr,
  $settings 
)

Function modifying the depthKey array

Parameters
array$arrArray with instructions to open/close nodes.
array$settingsInput depth_key array
Returns
array Output depth_key array with entries added/removed based on $arr

Definition at line 229 of file ArrayBrowser.php.

Referenced by ArrayBrowser\tree().

getSearchKeys (   $keyArr,
  $depth_in,
  $searchString,
  $keyArray 
)

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

Parameters
array$keyArrThe array to search for the value
string$depth_inDepth string - blank for first call (will build up during recursive calling creating an id of the position: [key1].[key2].[key3]
string$searchStringThe string to search for
array$keyArrayKey array, for first call pass empty array
Returns
array

Definition at line 188 of file ArrayBrowser.php.

tree (   $array,
  $positionKey,
  $depthData = null 
)

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

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

Parameters
array$arrayThe array to display
string$positionKeyKey-position id. Build up during recursive calls - [key1].[key2].[key3] - an so on.
string$depthDatais deprecated since TYPO3 CMS 7, and will be removed with CMS 8
Returns
string HTML for the tree

Definition at line 96 of file ArrayBrowser.php.

References ArrayBrowser\$expAll, GeneralUtility\_GP(), GeneralUtility\deprecationLog(), ArrayBrowser\depthKeys(), ArrayBrowser\wrapArrayKey(), and ArrayBrowser\wrapValue().

wrapArrayKey (   $label,
  $depth,
  $theValue 
)

Wrapping the value in bold tags etc.

Parameters
string$labelThe title string
string$depthDepth path
string$theValueThe value for the array entry.
Returns
string Title string, htmlspecialchars()'ed

Definition at line 159 of file ArrayBrowser.php.

References GeneralUtility\_GP().

Referenced by ArrayBrowser\tree().

wrapValue (   $theValue)

Wrapping the value in bold tags etc.

Parameters
string$theValueThe title string
Returns
string Title string, htmlspecialchars()'ed

Definition at line 142 of file ArrayBrowser.php.

Referenced by ArrayBrowser\tree().

Member Data Documentation

$depthKeys = array()

Definition at line 44 of file ArrayBrowser.php.

$dontLinkVar = false

Definition at line 37 of file ArrayBrowser.php.

$expAll = false

Definition at line 30 of file ArrayBrowser.php.

Referenced by ArrayBrowser\tree().

$fixedLgd = 1

Definition at line 60 of file ArrayBrowser.php.

$regexMode = 0

Definition at line 68 of file ArrayBrowser.php.

$searchKeys = array()

Definition at line 52 of file ArrayBrowser.php.

$searchKeysToo = false

Definition at line 75 of file ArrayBrowser.php.

$varName = ''

Definition at line 82 of file ArrayBrowser.php.