TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Lowlevel\Utility\ArrayBrowser Class Reference
Inheritance diagram for TYPO3\CMS\Lowlevel\Utility\ArrayBrowser:
t3lib_arrayBrowser

Public Member Functions

 tree ($arr, $depth_in, $depthData)
 
 wrapValue ($theValue, $depth)
 
 wrapArrayKey ($label, $depth, $theValue)
 
 getSearchKeys ($keyArr, $depth_in, $searchString, $keyArray)
 
 fixed_lgd ($string, $chars)
 
 depthKeys ($arr, $settings)
 

Public Attributes

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

Detailed Description

This file is part of the TYPO3 CMS project.

It is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, either version 2 of the License, or any later version.

For the full copyright and license information, please read the LICENSE.txt file that was distributed with this source code.

The TYPO3 project - inspiring people to share! Class for displaying an array as a tree See the extension 'lowlevel' /config (Backend module 'Tools > Configuration')

Author
Kasper Skårhøj kaspe.nosp@m.rYYY.nosp@m.Y@typ.nosp@m.o3.c.nosp@m.om
See also
SC_mod_tools_config_index::main()

Definition at line 24 of file ArrayBrowser.php.

Member Function Documentation

◆ depthKeys()

TYPO3\CMS\Lowlevel\Utility\ArrayBrowser::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
See also
SC_mod_tools_config_index::main()
Todo:
Define visibility

Definition at line 236 of file ArrayBrowser.php.

Referenced by TYPO3\CMS\Lowlevel\Utility\ArrayBrowser\tree().

◆ fixed_lgd()

TYPO3\CMS\Lowlevel\Utility\ArrayBrowser::fixed_lgd (   $string,
  $chars 
)

Fixed length function

Parameters
string$stringString to process
integer$charsMax number of chars
Returns
string Processed string
Todo:
Define visibility

Definition at line 218 of file ArrayBrowser.php.

Referenced by TYPO3\CMS\Lowlevel\Utility\ArrayBrowser\tree().

◆ getSearchKeys()

TYPO3\CMS\Lowlevel\Utility\ArrayBrowser::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
Todo:
Define visibility

Definition at line 182 of file ArrayBrowser.php.

◆ tree()

TYPO3\CMS\Lowlevel\Utility\ArrayBrowser::tree (   $arr,
  $depth_in,
  $depthData 
)

Make browsable tree Before calling this function you may want to set some of the internal vars like depthKeys, regexMode and fixedLgd. For examples see SC_mod_tools_config_index::main()

Parameters
array$arrThe array to display
string$depth_inKey-position id. Build up during recursive calls - [key1].[key2].[key3] - an so on.
string$depthDataDepth-data - basically a prefix for the icons. For calling this function from outside, let it stay blank.
Returns
string HTML for the tree
See also
SC_mod_tools_config_index::main()
Todo:
Define visibility

Definition at line 86 of file ArrayBrowser.php.

References TYPO3\CMS\Lowlevel\Utility\ArrayBrowser\$expAll, $GLOBALS, TYPO3\CMS\Core\Utility\GeneralUtility\_GP(), TYPO3\CMS\Lowlevel\Utility\ArrayBrowser\depthKeys(), TYPO3\CMS\Lowlevel\Utility\ArrayBrowser\fixed_lgd(), TYPO3\CMS\Backend\Utility\BackendUtility\getModuleUrl(), TYPO3\CMS\Backend\Utility\IconUtility\skinImg(), TYPO3\CMS\Lowlevel\Utility\ArrayBrowser\wrapArrayKey(), and TYPO3\CMS\Lowlevel\Utility\ArrayBrowser\wrapValue().

◆ wrapArrayKey()

TYPO3\CMS\Lowlevel\Utility\ArrayBrowser::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
Todo:
Define visibility

Definition at line 160 of file ArrayBrowser.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\_GP(), and TYPO3\CMS\Backend\Utility\BackendUtility\getModuleUrl().

Referenced by TYPO3\CMS\Lowlevel\Utility\ArrayBrowser\tree().

◆ wrapValue()

TYPO3\CMS\Lowlevel\Utility\ArrayBrowser::wrapValue (   $theValue,
  $depth 
)

Wrapping the value in bold tags etc.

Parameters
string$theValueThe title string
string$depthDepth path
Returns
string Title string, htmlspecialchars()'ed
Todo:
Define visibility

Definition at line 143 of file ArrayBrowser.php.

Referenced by TYPO3\CMS\Lowlevel\Utility\ArrayBrowser\tree().

Member Data Documentation

◆ $depthKeys

TYPO3\CMS\Lowlevel\Utility\ArrayBrowser::$depthKeys = array()
Todo:
Define visibility

Definition at line 41 of file ArrayBrowser.php.

◆ $dontLinkVar

TYPO3\CMS\Lowlevel\Utility\ArrayBrowser::$dontLinkVar = FALSE
Todo:
Define visibility

Definition at line 35 of file ArrayBrowser.php.

◆ $expAll

TYPO3\CMS\Lowlevel\Utility\ArrayBrowser::$expAll = FALSE
Todo:
Define visibility

Definition at line 29 of file ArrayBrowser.php.

Referenced by TYPO3\CMS\Lowlevel\Utility\ArrayBrowser\tree().

◆ $fixedLgd

TYPO3\CMS\Lowlevel\Utility\ArrayBrowser::$fixedLgd = 1
Todo:
Define visibility

Definition at line 53 of file ArrayBrowser.php.

◆ $regexMode

TYPO3\CMS\Lowlevel\Utility\ArrayBrowser::$regexMode = 0
Todo:
Define visibility

Definition at line 59 of file ArrayBrowser.php.

◆ $searchKeys

TYPO3\CMS\Lowlevel\Utility\ArrayBrowser::$searchKeys = array()
Todo:
Define visibility

Definition at line 47 of file ArrayBrowser.php.

◆ $searchKeysToo

TYPO3\CMS\Lowlevel\Utility\ArrayBrowser::$searchKeysToo = FALSE
Todo:
Define visibility

Definition at line 65 of file ArrayBrowser.php.

◆ $varName

TYPO3\CMS\Lowlevel\Utility\ArrayBrowser::$varName = ''
Todo:
Define visibility

Definition at line 71 of file ArrayBrowser.php.