Documentation TYPO3 par Ameos |
Public Member Functions | |
init ($clause='', $orderByFields='') | |
setTreeName ($treeName='') | |
addField ($field, $noCheck=0) | |
reset () | |
getBrowsableTree () | |
printTree ($treeArr='') | |
PMicon ($row, $a, $c, $nextCount, $exp) | |
PM_ATagWrap ($icon, $cmd, $bMark='') | |
wrapTitle ($title, $row, $bank=0) | |
wrapIcon ($icon, $row) | |
addTagAttributes ($icon, $attr) | |
wrapStop ($str, $row) | |
expandNext ($id) | |
initializePositionSaving () | |
savePosition () | |
getRootIcon ($rec) | |
getIcon ($row) | |
getTitleStr ($row, $titleLen=30) | |
getTitleAttrib ($row) | |
getId ($row) | |
getJumpToParam ($row) | |
getTree ($uid, $depth=999, $depthData='', $blankLineCode='', $subCSSclass='') | |
getCount ($uid) | |
getRootRecord ($uid) | |
getRecord ($uid) | |
getDataInit ($parentId, $subCSSclass='') | |
getDataCount (&$res) | |
getDataNext (&$res, $subCSSclass='') | |
getDataFree (&$res) | |
setDataFromArray (&$dataArr, $traverse=FALSE, $pid=0) | |
setDataFromTreeArray (&$treeArr, &$treeLookupArr) | |
Public Attributes | |
$expandFirst = 0 | |
$expandAll = 0 | |
$thisScript = '' | |
$titleAttrib = 'title' | |
$ext_IconMode = false | |
$addSelfId = 0 | |
$title = 'no title' | |
$showDefaultTitleAttribute = FALSE | |
$highlightPagesWithVersions = TRUE | |
$BE_USER = '' | |
$MOUNTS = '' | |
$table = '' | |
$parentField = 'pid' | |
$clause = '' | |
$orderByFields = '' | |
$fieldArray = Array('uid','title') | |
$defaultList = 'uid,pid,tstamp,sorting,deleted,perms_userid,perms_groupid,perms_user,perms_group,perms_everybody,crdate,cruser_id' | |
$treeName = '' | |
$domIdPrefix = 'row' | |
$backPath | |
$iconPath = '' | |
$iconName = 'default.gif' | |
$makeHTML = 1 | |
$setRecs = 0 | |
$subLevelID = '_SUB_LEVEL' | |
$ids = Array() | |
$ids_hierarchy = array() | |
$buffer_idH = array() | |
$specUIDmap = array() | |
$data = false | |
$dataLookup = false | |
$tree = Array() | |
$stored = array() | |
$bank = 0 | |
$recs = array() |
Definition at line 115 of file class.t3lib_treeview.php.
|
Adds a fieldname to the internal array ->fieldArray
Definition at line 315 of file class.t3lib_treeview.php. References t3lib_div::inList(). |
|
Adds attributes to image tag.
Definition at line 535 of file class.t3lib_treeview.php. Referenced by t3lib_folderTree::wrapIcon(), t3lib_browseTree::wrapIcon(), localFolderTree::wrapIcon(), printAllPageTree::wrapIcon(), and localPageTree::wrapIcon(). |
|
Returns true/false if the next level for $id should be expanded - based on data in $this->stored[][] and ->expandAll flag. Extending parent function
Reimplemented in t3lib_pageTree, and localPageTree. Definition at line 575 of file class.t3lib_treeview.php. Referenced by t3lib_folderTree::getFolderTree(), and getTree(). |
|
Will create and return the HTML code for a browsable tree Is based on the mounts found in the internal array ->MOUNTS (set in the constructor)
Reimplemented in t3lib_folderTree. Definition at line 349 of file class.t3lib_treeview.php. References getIcon(), getRecord(), getRootIcon(), getRootRecord(), getTree(), initializePositionSaving(), PM_ATagWrap(), printTree(), and reset(). |
|
Returns the number of records having the parent id, $uid
Reimplemented in t3lib_folderTree. Definition at line 839 of file class.t3lib_treeview.php. References t3lib_BEfunc::deleteClause(), getDataCount(), getDataInit(), and t3lib_BEfunc::versioningPlaceholderClause(). Referenced by getTree(). |
|
Getting the tree data: Counting elements in resource
Definition at line 929 of file class.t3lib_treeview.php. Referenced by getCount(), and getTree(). |
|
Getting the tree data: frees data handle
Definition at line 986 of file class.t3lib_treeview.php. Referenced by getTree(). |
|
Getting the tree data: Selecting/Initializing data pointer to items for a certain parent id. For tables: This will make a database query to select all children to "parent" For arrays: This will return key to the ->dataLookup array
Definition at line 898 of file class.t3lib_treeview.php. References t3lib_BEfunc::deleteClause(), reset(), and t3lib_BEfunc::versioningPlaceholderClause(). Referenced by getCount(), and getTree(). |
|
Getting the tree data: next entry
Definition at line 947 of file class.t3lib_treeview.php. References t3lib_BEfunc::countVersionsOfRecordsOnPage(), and t3lib_BEfunc::workspaceOL(). Referenced by getTree(). |
|
Get icon for the row. If $this->iconPath and $this->iconName is set, try to get icon based on those values.
Definition at line 654 of file class.t3lib_treeview.php. References t3lib_iconWorks::getIconImage(), and wrapIcon(). Referenced by getBrowsableTree(), and getTree(). |
|
Returns the id from the record (typ. uid)
Reimplemented in t3lib_folderTree. Definition at line 695 of file class.t3lib_treeview.php. Referenced by getJumpToParam(), and t3lib_browseTree::wrapIcon(). |
|
Returns jump-url parameter value.
Reimplemented in t3lib_folderTree. Definition at line 705 of file class.t3lib_treeview.php. References getId(). Referenced by localPageTree::wrapIcon(), t3lib_browseTree::wrapIcon(), localPageTree::wrapTitle(), and wrapTitle(). |
|
Returns the record for a uid. For tables: Looks up the record in the database. For arrays: Returns the fake record for uid id.
Definition at line 878 of file class.t3lib_treeview.php. Referenced by getBrowsableTree(). |
|
Returns the root icon for a tree/mountpoint (defaults to the globe)
Definition at line 641 of file class.t3lib_treeview.php. References t3lib_iconWorks::skinImg(), and wrapIcon(). Referenced by getBrowsableTree(). |
|
Returns root record for uid (<=0)
Definition at line 865 of file class.t3lib_treeview.php. Referenced by getBrowsableTree(). |
|
Returns the value for the image "title" attribute
Reimplemented in t3lib_browseTree. Definition at line 685 of file class.t3lib_treeview.php. |
|
Returns the title for the input record. If blank, a "no title" labele (localized) will be returned. Do NOT htmlspecialchar the string from this function - has already been done.
Reimplemented in t3lib_folderTree. Definition at line 673 of file class.t3lib_treeview.php. References $title, and t3lib_div::fixed_lgd_cs(). Referenced by printTree(). |
|
Fetches the data for the tree
sub-elements
Definition at line 739 of file class.t3lib_treeview.php. References expandNext(), getCount(), getDataCount(), getDataFree(), getDataInit(), getDataNext(), getIcon(), and wrapStop(). Referenced by localPageTree::ext_tree(), and getBrowsableTree(). |
|
Initialize the tree class. Needs to be overwritten Will set ->fieldsArray, ->backPath and ->clause
Definition at line 270 of file class.t3lib_treeview.php. References $clause, $orderByFields, t3lib_div::loadTCA(), and setTreeName(). Referenced by localFolderTree::localFolderTree(). |
|
Get stored tree structure AND updating it if needed according to incoming PM GET var.
Reimplemented in t3lib_folderTree, t3lib_pageTree, localPageTree, and localFolderTree. Definition at line 585 of file class.t3lib_treeview.php. References t3lib_div::_GP(), and savePosition(). Referenced by getBrowsableTree(). |
|
Wrap the plus/minus icon in a link
Reimplemented in localPageTree, localFolderTree, localPageTree, printAllPageTree, localFolderTree, printAllFolderTree, localPageTree, localPageTree, localFolderTree, and tx_rtehtmlarea_image_localFolderTree. Definition at line 489 of file class.t3lib_treeview.php. Referenced by getBrowsableTree(), t3lib_folderTree::getBrowsableTree(), and PMicon(). |
|
Generate the plus/minus icon for the browsable tree.
Reimplemented in t3lib_pageTree. Definition at line 467 of file class.t3lib_treeview.php. References PM_ATagWrap(). |
|
Compiles the HTML code for displaying the structure found inside the ->tree array
Reimplemented in localPageTree, localFolderTree, localPageTree, localFolderTree, and tx_rtehtmlarea_image_localFolderTree. Definition at line 412 of file class.t3lib_treeview.php. References getTitleStr(), and wrapTitle(). Referenced by getBrowsableTree(), and t3lib_folderTree::getBrowsableTree(). |
|
Resets the tree, recs, ids, and ids_hierarchy internal variables. Use it if you need it.
Definition at line 329 of file class.t3lib_treeview.php. Referenced by localPageTree::ext_tree(), getBrowsableTree(), t3lib_folderTree::getBrowsableTree(), getDataInit(), and printAllPageTree_perms::printTree(). |
|
Saves the content of ->stored (keeps track of expanded positions in the tree) $this->treeName will be used as key for BE_USER->uc[] to store it in
Definition at line 612 of file class.t3lib_treeview.php. Referenced by initializePositionSaving(), and t3lib_folderTree::initializePositionSaving(). |
|
Used to initialize class with an array to browse. The array inputted will be traversed and an internal index for lookup is created. The keys of the input array are perceived as "uid"s of records which means that keys GLOBALLY must be unique like uids are. "uid" and "pid" "fakefields" are also set in each record. All other fields are optional.
Definition at line 1006 of file class.t3lib_treeview.php. |
|
Sets the internal data arrays
Definition at line 1035 of file class.t3lib_treeview.php. |
|
Sets the tree name which is used to identify the tree Used for JavaScript and other things
Definition at line 301 of file class.t3lib_treeview.php. References $treeName. Referenced by init(), and t3lib_browseTree::init(). |
|
Wrapping the image tag, $icon, for the row, $row (except for mount points)
Reimplemented in t3lib_browseTree, t3lib_folderTree, localPageTree, localPageTree, localPageTree, localPageTree, printAllPageTree, localFolderTree, localPageTree, and localPageTree. Definition at line 524 of file class.t3lib_treeview.php. Referenced by getIcon(), and getRootIcon(). |
|
Adds a red "+" to the input string, $str, if the field "php_tree_stop" in the $row (pages) is set
Reimplemented in localPageTree. Definition at line 547 of file class.t3lib_treeview.php. Referenced by getTree(). |
|
Wrapping $title in a-tags.
Reimplemented in t3lib_folderTree, localPageTree, localFolderTree, localPageTree, TBE_PageTree, localPageTree, and TBE_PageTree. Definition at line 511 of file class.t3lib_treeview.php. References getJumpToParam(). Referenced by printTree(). |
|
Back path for icons Definition at line 202 of file class.t3lib_treeview.php. |
|
Needs to be initialized with $GLOBALS['BE_USER'] Done by default in init() Definition at line 132 of file class.t3lib_treeview.php. Referenced by localFolderTree::localFolderTree(), and localPageTree::localPageTree(). |
|
WHERE clause used for selecting records for the tree. Is set by function init. Only makes sense when $this->table is set.
Definition at line 159 of file class.t3lib_treeview.php. Referenced by localPageTree::ext_tree(), init(), t3lib_pageTree::init(), and t3lib_browseTree::init(). |
|
List of other fields which are ALLOWED to set (here, based on the "pages" table!)
Reimplemented in t3lib_pageTree. Definition at line 179 of file class.t3lib_treeview.php. |
|
A prefix for table cell id's which will be wrapped around an item. Can be used for highlighting by JavaScript. Needs to be unique if multiple trees are on one HTML page.
Definition at line 197 of file class.t3lib_treeview.php. |
|
Default set of fields selected from the tree table. Make SURE that these fields names listed herein are actually possible to select from $this->table (if that variable is set to a TCA table name)
Reimplemented in t3lib_pageTree. Definition at line 173 of file class.t3lib_treeview.php. |
|
Icon file name for item icons. Definition at line 213 of file class.t3lib_treeview.php. |
|
Icon file path. Definition at line 207 of file class.t3lib_treeview.php. |
|
If true, HTML code is also accumulated in ->tree array during rendering of the tree. If 2, then also the icon prefix code (depthData) is stored Definition at line 219 of file class.t3lib_treeview.php. |
|
Needs to be initialized with e.g. $GLOBALS['WEBMOUNTS'] Default setting in init() is 0 => 0 The keys are mount-ids (can be anything basically) and the values are the ID of the root element (COULD be zero or anything else. For pages that would be the uid of the page, zero for the pagetree root.) Definition at line 139 of file class.t3lib_treeview.php. |
|
Field for ORDER BY. Is set by function init. Only makes sense when $this->table is set.
Definition at line 166 of file class.t3lib_treeview.php. Referenced by init(). |
|
Defines the field of $table which is the parent id field (like pid for table pages). Definition at line 152 of file class.t3lib_treeview.php. |
|
If true, records as selected will be stored internally in the ->recs array Reimplemented in t3lib_pageTree. Definition at line 224 of file class.t3lib_treeview.php. |
|
Sets the associative array key which identifies a new sublevel if arrays are used for trees. This value has formerly been "subLevel" and "--sublevel--" Definition at line 230 of file class.t3lib_treeview.php. |
|
Database table to get the tree data from. Leave blank if data comes from an array. Definition at line 147 of file class.t3lib_treeview.php. |
|
Unique name for the tree. Used as key for storing the tree into the BE users settings. Used as key to pass parameters in links. MUST NOT contain underscore chars. etc. Definition at line 189 of file class.t3lib_treeview.php. Referenced by setTreeName(). |