localFolderTree Klassenreferenz
Aufstellung aller Elemente
Öffentliche Methoden |
| | localFolderTree () |
| | wrapTitle ($title, $v) |
| | ext_isLinkable ($v) |
| | PM_ATagWrap ($icon, $cmd, $bMark='') |
| | printTree ($treeArr='') |
| | t3lib_folderTree () |
| | wrapIcon ($icon, $row) |
| | wrapTitle ($title, $row, $bank=0) |
| | getId ($v) |
| | getJumpToParam ($v) |
| | getTitleStr ($row, $titleLen=30) |
| | getBrowsableTree () |
| | getFolderTree ($files_path, $depth=999, $depthData='', $type='') |
| | getCount ($files_path) |
| | initializePositionSaving () |
| | init ($clause='', $orderByFields='') |
| | setTreeName ($treeName='') |
| | addField ($field, $noCheck=0) |
| | reset () |
| | PMicon ($row, $a, $c, $nextCount, $exp) |
| | addTagAttributes ($icon, $attr) |
| | wrapStop ($str, $row) |
| | expandNext ($id) |
| | savePosition () |
| | getRootIcon ($rec) |
| | getIcon ($row) |
| | getTitleAttrib ($row) |
| | getTree ($uid, $depth=999, $depthData='', $blankLineCode='', $subCSSclass='') |
| | getRootRecord ($uid) |
| | getRecord ($uid) |
| | getDataInit ($parentId, $subCSSclass='') |
| | getDataCount (&$res) |
| | getDataNext (&$res, $subCSSclass='') |
| | getDataFree (&$res) |
| | setDataFromArray (&$dataArr, $traverse=FALSE, $pid=0) |
| | setDataFromTreeArray (&$treeArr, &$treeLookupArr) |
Öffentliche Attribute |
|
| $ext_IconMode = 1 |
|
| $expandFirst = 0 |
|
| $expandAll = 0 |
|
| $thisScript = '' |
|
| $titleAttrib = 'title' |
|
| $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() |
|
| $orig_ids_hierarchy = array() |
|
| $buffer_idH = array() |
|
| $specUIDmap = array() |
|
| $data = false |
|
| $dataLookup = false |
|
| $tree = Array() |
|
| $stored = array() |
|
| $bank = 0 |
|
| $recs = array() |
Dokumentation der Elementfunktionen
| t3lib_treeView::addField |
( |
$ |
field, |
|
|
$ |
noCheck = 0 | |
|
) |
| | [inherited] |
Adds a fieldname to the internal array ->fieldArray
- Parameter:
-
| string | Field name to |
| boolean | If set, the fieldname will be set no matter what. Otherwise the field name must either be found as key in $TCA[$table]['columns'] or in the list ->defaultList |
- Rückgabe:
- void
| t3lib_treeView::addTagAttributes |
( |
$ |
icon, |
|
|
$ |
attr | |
|
) |
| | [inherited] |
Adds attributes to image tag.
- Parameter:
-
| string | Icon image tag |
| string | Attributes to add, eg. ' border="0"' |
- Rückgabe:
- string Image tag, modified with $attr attributes added.
| t3lib_treeView::expandNext |
( |
$ |
id |
) |
[inherited] |
Returns true/false if the next level for $id should be expanded - based on data in $this->stored[][] and ->expandAll flag. Extending parent function
- Parameter:
-
- Rückgabe:
- boolean private
- Siehe auch:
- t3lib_pageTree::expandNext()
Erneute Implementation in t3lib_pageTree und localPageTree.
| localFolderTree::ext_isLinkable |
( |
$ |
v |
) |
|
Returns true if the input "record" contains a folder which can be linked.
- Parameter:
-
| array | Array with information about the folder element. Contains keys like title, uid, path, _title |
- Rückgabe:
- boolean True is returned if the path is found in the web-part of the server and is NOT a recycler or temp folder
Erneute Implementation in TBE_FolderTree.
| t3lib_folderTree::getBrowsableTree |
( |
|
) |
[inherited] |
Will create and return the HTML code for a browsable tree of folders. Is based on the mounts found in the internal array ->MOUNTS (set in the constructor)
- Rückgabe:
- string HTML code for the browsable tree
Erneute Implementation von t3lib_treeView.
Erneute Implementation in filelistFolderTree.
| t3lib_folderTree::getCount |
( |
$ |
files_path |
) |
[inherited] |
Counts the number of directories in a file path.
- Parameter:
-
- Rückgabe:
- integer
Erneute Implementation von t3lib_treeView.
| t3lib_treeView::getDataCount |
( |
&$ |
res |
) |
[inherited] |
Getting the tree data: Counting elements in resource
- Parameter:
-
- Rückgabe:
- integer number of items private
- Siehe auch:
- getDataInit()
| t3lib_treeView::getDataFree |
( |
&$ |
res |
) |
[inherited] |
Getting the tree data: frees data handle
- Parameter:
-
- Rückgabe:
- void private
| t3lib_treeView::getDataInit |
( |
$ |
parentId, |
|
|
$ |
subCSSclass = '' | |
|
) |
| | [inherited] |
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
- Parameter:
-
| integer | parent item id |
| string | Class for sub-elements. |
- Rückgabe:
- mixed data handle (Tables: An sql-resource, arrays: A parentId integer. -1 is returned if there were NO subLevel.) private
| t3lib_treeView::getDataNext |
( |
&$ |
res, |
|
|
$ |
subCSSclass = '' | |
|
) |
| | [inherited] |
Getting the tree data: next entry
- Parameter:
-
| mixed | data handle |
| string | CSS class for sub elements (workspace related) |
- Rückgabe:
- array item data array OR FALSE if end of elements. private
- Siehe auch:
- getDataInit()
| t3lib_folderTree::getFolderTree |
( |
$ |
files_path, |
|
|
$ |
depth = 999, |
|
|
$ |
depthData = '', |
|
|
$ |
type = '' | |
|
) |
| | [inherited] |
Fetches the data for the tree
- Parameter:
-
| string | Abs file path |
| integer | Max depth (recursivity limit) |
| string | HTML-code prefix for recursive calls. |
- Rückgabe:
- integer The count of items on the level
- Siehe auch:
- getBrowsableTree()
| t3lib_treeView::getIcon |
( |
$ |
row |
) |
[inherited] |
Get icon for the row. If $this->iconPath and $this->iconName is set, try to get icon based on those values.
- Parameter:
-
- Rückgabe:
- string Image tag.
| t3lib_folderTree::getId |
( |
$ |
v |
) |
[inherited] |
Returns the id from the record - for folders, this is an md5 hash.
- Parameter:
-
- Rückgabe:
- integer The "uid" field value.
Erneute Implementation von t3lib_treeView.
| t3lib_folderTree::getJumpToParam |
( |
$ |
v |
) |
[inherited] |
Returns jump-url parameter value.
- Parameter:
-
- Rückgabe:
- string The jump-url parameter.
Erneute Implementation von t3lib_treeView.
| t3lib_treeView::getRecord |
( |
$ |
uid |
) |
[inherited] |
Returns the record for a uid. For tables: Looks up the record in the database. For arrays: Returns the fake record for uid id.
- Parameter:
-
- Rückgabe:
- array The record
| t3lib_treeView::getRootIcon |
( |
$ |
rec |
) |
[inherited] |
Returns the root icon for a tree/mountpoint (defaults to the globe)
- Parameter:
-
- Rückgabe:
- string Icon image tag.
| t3lib_treeView::getRootRecord |
( |
$ |
uid |
) |
[inherited] |
Returns root record for uid (<=0)
- Parameter:
-
| integer | uid, <= 0 (normally, this does not matter) |
- Rückgabe:
- array Array with title/uid keys with values of $this->title/0 (zero)
| t3lib_treeView::getTitleAttrib |
( |
$ |
row |
) |
[inherited] |
Returns the value for the image "title" attribute
- Parameter:
-
| array | The input row array (where the key "title" is used for the title) |
- Rückgabe:
- string The attribute value (is htmlspecialchared() already)
- Siehe auch:
- wrapIcon()
Erneute Implementation in t3lib_browseTree.
| t3lib_folderTree::getTitleStr |
( |
$ |
row, |
|
|
$ |
titleLen = 30 | |
|
) |
| | [inherited] |
Returns the title for the input record. If blank, a "no title" labele (localized) will be returned. '_title' is used for setting an alternative title for folders.
- Parameter:
-
| array | The input row array (where the key "_title" is used for the title) |
| integer | Title length (30) |
- Rückgabe:
- string The title.
Erneute Implementation von t3lib_treeView.
| t3lib_treeView::getTree |
( |
$ |
uid, |
|
|
$ |
depth = 999, |
|
|
$ |
depthData = '', |
|
|
$ |
blankLineCode = '', |
|
|
$ |
subCSSclass = '' | |
|
) |
| | [inherited] |
Fetches the data for the tree
- Parameter:
-
| integer | item id for which to select subitems (parent id) |
| integer | Max depth (recursivity limit) |
| string | HTML-code prefix for recursive calls. |
| string | ? (internal) |
| string | CSS class to use for |
sub-elements
- Rückgabe:
- integer The count of items on the level
| t3lib_treeView::init |
( |
$ |
clause = '', |
|
|
$ |
orderByFields = '' | |
|
) |
| | [inherited] |
Initialize the tree class. Needs to be overwritten Will set ->fieldsArray, ->backPath and ->clause
- Parameter:
-
| string | record WHERE clause |
| string | record ORDER BY field |
- Rückgabe:
- void
| t3lib_folderTree::initializePositionSaving |
( |
|
) |
[inherited] |
Get stored tree structure AND updating it if needed according to incoming PM GET var.
- Rückgabe:
- void private
Erneute Implementation von t3lib_treeView.
| localFolderTree::localFolderTree |
( |
|
) |
|
Initializes the script path
- Rückgabe:
- void
| localFolderTree::PM_ATagWrap |
( |
$ |
icon, |
|
|
$ |
cmd, |
|
|
$ |
bMark = '' | |
|
) |
| | |
Wrap the plus/minus icon in a link
- Parameter:
-
| string | HTML string to wrap, probably an image tag. |
| string | Command for 'PM' get var |
| boolean | If set, the link will have a anchor point (=$bMark) and a name attribute (=$bMark) |
- Rückgabe:
- string Link-wrapped input string private
Erneute Implementation von t3lib_treeView.
| t3lib_treeView::PMicon |
( |
$ |
row, |
|
|
$ |
a, |
|
|
$ |
c, |
|
|
$ |
nextCount, |
|
|
$ |
exp | |
|
) |
| | [inherited] |
Generate the plus/minus icon for the browsable tree.
- Parameter:
-
| array | record for the entry |
| integer | The current entry number |
| integer | The total number of entries. If equal to $a, a "bottom" element is returned. |
| integer | The number of sub-elements to the current element. |
| boolean | The element was expanded to render subelements if this flag is set. |
- Rückgabe:
- string Image tag with the plus/minus icon. private
- Siehe auch:
- t3lib_pageTree::PMicon()
Erneute Implementation in t3lib_pageTree, filelistFolderTree und webPageTree.
| localFolderTree::printTree |
( |
$ |
treeArr = '' |
) |
|
Create the folder navigation tree in HTML
- Parameter:
-
| mixed | Input tree array. If not array, then $this->tree is used. |
- Rückgabe:
- string HTML output of the tree.
Erneute Implementation von t3lib_treeView.
| t3lib_treeView::reset |
( |
|
) |
[inherited] |
Resets the tree, recs, ids, ids_hierarchy and orig_ids_hierarchy internal variables. Use it if you need it.
- Rückgabe:
- void
| t3lib_treeView::savePosition |
( |
|
) |
[inherited] |
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
- Rückgabe:
- void private
| t3lib_treeView::setDataFromArray |
( |
&$ |
dataArr, |
|
|
$ |
traverse = FALSE, |
|
|
$ |
pid = 0 | |
|
) |
| | [inherited] |
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.
- Parameter:
-
| array | The input array, see examples below in this script. |
| boolean | Internal, for recursion. |
| integer | Internal, for recursion. |
- Rückgabe:
- void
| t3lib_treeView::setDataFromTreeArray |
( |
&$ |
treeArr, |
|
|
&$ |
treeLookupArr | |
|
) |
| | [inherited] |
Sets the internal data arrays
- Parameter:
-
| array | Content for $this->data |
| array | Content for $this->dataLookup |
- Rückgabe:
- void
| t3lib_treeView::setTreeName |
( |
$ |
treeName = '' |
) |
[inherited] |
Sets the tree name which is used to identify the tree Used for JavaScript and other things
- Parameter:
-
| string | Default is the table name. Underscores are stripped. |
- Rückgabe:
- void
| t3lib_folderTree::t3lib_folderTree |
( |
|
) |
[inherited] |
Constructor function of the class
- Rückgabe:
- void
| t3lib_folderTree::wrapIcon |
( |
$ |
icon, |
|
|
$ |
row | |
|
) |
| | [inherited] |
Wrapping the folder icon
- Parameter:
-
| string | The image tag for the icon |
| array | The row for the current element |
- Rückgabe:
- string The processed icon input value. private
Erneute Implementation von t3lib_treeView.
| t3lib_treeView::wrapStop |
( |
$ |
str, |
|
|
$ |
row | |
|
) |
| | [inherited] |
Adds a red "+" to the input string, $str, if the field "php_tree_stop" in the $row (pages) is set
- Parameter:
-
| string | Input string, like a page title for the tree |
| array | record row with "php_tree_stop" field |
- Rückgabe:
- string Modified string private
Erneute Implementation in webPageTree.
| t3lib_folderTree::wrapTitle |
( |
$ |
title, |
|
|
$ |
row, |
|
|
$ |
bank = 0 | |
|
) |
| | [inherited] |
Wrapping $title in a-tags.
- Parameter:
-
| string | Title string |
| string | Item record |
| integer | Bank pointer (which mount point number) |
- Rückgabe:
- string private
Erneute Implementation von t3lib_treeView.
Erneute Implementation in filelistFolderTree.
| localFolderTree::wrapTitle |
( |
$ |
title, |
|
|
$ |
v | |
|
) |
| | |
Wrapping the title in a link, if applicable.
- Parameter:
-
| string | Title, ready for output. |
| array | The "record" |
- Rückgabe:
- string Wrapping title string.
Erneute Implementation in TBE_FolderTree.
Dokumentation der Datenelemente
t3lib_treeView::$backPath [inherited] |
t3lib_treeView::$clause = '' [inherited] |
WHERE clause used for selecting records for the tree. Is set by function init. Only makes sense when $this->table is set.
- Siehe auch:
- init()
t3lib_treeView::$defaultList = 'uid,pid,tstamp,sorting,deleted,perms_userid,perms_groupid,perms_user,perms_group,perms_everybody,crdate,cruser_id' [inherited] |
List of other fields which are ALLOWED to set (here, based on the "pages" table!)
- Siehe auch:
- addField()
Erneute Implementation in t3lib_pageTree.
t3lib_treeView::$domIdPrefix = 'row' [inherited] |
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.
- Siehe auch:
- printTree()
t3lib_treeView::$fieldArray = Array('uid','title') [inherited] |
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)
- Siehe auch:
- addField()
Erneute Implementation in t3lib_pageTree.
t3lib_treeView::$iconName = 'default.gif' [inherited] |
Icon file name for item icons.
t3lib_treeView::$iconPath = '' [inherited] |
t3lib_treeView::$makeHTML = 1 [inherited] |
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
t3lib_treeView::$MOUNTS = '' [inherited] |
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.)
t3lib_treeView::$orderByFields = '' [inherited] |
Field for ORDER BY. Is set by function init. Only makes sense when $this->table is set.
- Siehe auch:
- init()
t3lib_treeView::$parentField = 'pid' [inherited] |
Defines the field of $table which is the parent id field (like pid for table pages).
t3lib_treeView::$setRecs = 0 [inherited] |
If true, records as selected will be stored internally in the ->recs array
Erneute Implementation in t3lib_pageTree.
t3lib_treeView::$subLevelID = '_SUB_LEVEL' [inherited] |
Sets the associative array key which identifies a new sublevel if arrays are used for trees. This value has formerly been "subLevel" and "--sublevel--"
t3lib_treeView::$table = '' [inherited] |
Database table to get the tree data from. Leave blank if data comes from an array.
t3lib_treeView::$treeName = '' [inherited] |
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.
Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Datei:
- /srv/www/vhosts/typo3.local/typo3_src-4.2.10/typo3/class.browse_links.php