Public Member Functions | |
| initializeClipboard () | |
| lockToNormal () | |
| setCmd ($cmd) | |
| setCurrentPad ($padIdent) | |
| endClipboard () | |
| cleanUpCBC ($CBarr, $table, $removeDeselected=0) | |
| printClipboard () | |
| printContentFromTab ($pad) | |
| padTitleWrap ($str, $pad) | |
| linkItemText ($str, $rec, $table='') | |
| selUrlDB ($table, $uid, $copy=0, $deselect=0, $baseArray=array()) | |
| selUrlFile ($path, $copy=0, $deselect=0, $baseArray=array()) | |
| pasteUrl ($table, $uid, $setRedirect=1) | |
| deleteUrl ($setRedirect=1, $file=0) | |
| editUrl () | |
| removeUrl ($table, $uid) | |
| confirmMsg ($table, $rec, $type, $clElements) | |
| clLabel ($key, $Akey='labels') | |
| exportClipElementParameters () | |
| removeElement ($el) | |
| saveClipboard () | |
| currentMode () | |
| cleanCurrent () | |
| elFromTable ($matchTable='', $pad='') | |
| isSelected ($table, $uid) | |
| getSelectedRecord ($table='', $uid='') | |
| isElements () | |
| makePasteCmdArray ($ref, $CMD) | |
| makeDeleteCmdArray ($CMD) | |
| makePasteCmdArray_file ($ref, $FILE) | |
| makeDeleteCmdArray_file ($FILE) | |
Public Attributes | |
| $numberTabs = 3 | |
| $clipData = array() | |
| $changed = 0 | |
| $current = '' | |
| $backPath = '' | |
| $lockToNormal = 0 | |
| $fileMode = 0 | |
Definition at line 97 of file class.t3lib_clipboard.php.
| t3lib_clipboard::initializeClipboard | ( | ) |
Initialize the clipboard from the be_user session
Definition at line 150 of file class.t3lib_clipboard.php.
| t3lib_clipboard::lockToNormal | ( | ) |
Call this method after initialization if you want to lock the clipboard to operate on the normal pad only. Trying to switch pad through ->setCmd will not work This is used by the clickmenu since it only allows operation on single elements at a time (that is the "normal" pad)
Definition at line 179 of file class.t3lib_clipboard.php.
| t3lib_clipboard::setCmd | ( | $ | cmd | ) |
The array $cmd may hold various keys which notes some action to take. Normally perform only one action at a time. In scripts like db_list.php / file_list.php the GET-var CB is used to control the clipboard.
Selecting / Deselecting elements Array $cmd['el'] has keys = element-ident, value = element value (see description of clipData array in header) Selecting elements for 'copy' should be done by simultaneously setting setCopyMode.
| array | Array of actions, see function description |
Definition at line 196 of file class.t3lib_clipboard.php.
| t3lib_clipboard::setCurrentPad | ( | $ | padIdent | ) |
Setting the current pad on clipboard
| string | Key in the array $this->clipData |
Definition at line 243 of file class.t3lib_clipboard.php.
| t3lib_clipboard::endClipboard | ( | ) |
Call this after initialization and setCmd in order to save the clipboard to the user session. The function will check if the internal flag ->changed has been set and if so, save the clipboard. Else not.
Definition at line 258 of file class.t3lib_clipboard.php.
| t3lib_clipboard::cleanUpCBC | ( | $ | CBarr, | |
| $ | table, | |||
| $ | removeDeselected = 0 | |||
| ) |
Cleans up an incoming element array $CBarr (Array selecting/deselecting elements)
| array | Element array from outside ("key" => "selected/deselected") | |
| string | $table is the 'table which is allowed'. Must be set. | |
| boolean | $removeDeselected can be set in order to remove entries which are marked for deselection. |
Definition at line 271 of file class.t3lib_clipboard.php.
| t3lib_clipboard::printClipboard | ( | ) |
Prints the clipboard
Definition at line 306 of file class.t3lib_clipboard.php.
| t3lib_clipboard::printContentFromTab | ( | $ | pad | ) |
Print the content on a pad. Called from ->printClipboard()
| string | Pad reference |
Definition at line 413 of file class.t3lib_clipboard.php.
| t3lib_clipboard::padTitleWrap | ( | $ | str, | |
| $ | pad | |||
| ) |
Wraps title of pad in bold-tags and maybe the number of elements if any.
| string | String (already htmlspecialchars()'ed) | |
| string | Pad reference |
Definition at line 487 of file class.t3lib_clipboard.php.
| t3lib_clipboard::linkItemText | ( | $ | str, | |
| $ | rec, | |||
| $ | table = '' | |||
| ) |
Wraps the title of the items listed in link-tags. The items will link to the page/folder where they originate from
| string | Title of element - must be htmlspecialchar'ed on beforehand. | |
| mixed | If array, a record is expected. If string, its a path | |
| string | Table name |
Definition at line 504 of file class.t3lib_clipboard.php.
| t3lib_clipboard::selUrlDB | ( | $ | table, | |
| $ | uid, | |||
| $ | copy = 0, |
|||
| $ | deselect = 0, |
|||
| $ | baseArray = array() | |||
| ) |
Returns the select-url for database elements
| string | Table name | |
| integer | Uid of record | |
| boolean | If set, copymode will be enabled | |
| boolean | If set, the link will deselect, otherwise select. | |
| array | The base array of GET vars to be sent in addition. Notice that current GET vars WILL automatically be included. |
Definition at line 531 of file class.t3lib_clipboard.php.
| t3lib_clipboard::selUrlFile | ( | $ | path, | |
| $ | copy = 0, |
|||
| $ | deselect = 0, |
|||
| $ | baseArray = array() | |||
| ) |
Returns the select-url for files
| string | Filepath | |
| boolean | If set, copymode will be enabled | |
| boolean | If set, the link will deselect, otherwise select. | |
| array | The base array of GET vars to be sent in addition. Notice that current GET vars WILL automatically be included. |
Definition at line 547 of file class.t3lib_clipboard.php.
| t3lib_clipboard::pasteUrl | ( | $ | table, | |
| $ | uid, | |||
| $ | setRedirect = 1 | |||
| ) |
pasteUrl of the element (database and file) For the meaning of $table and $uid, please read from ->makePasteCmdArray!!! The URL will point to tce_file or tce_db depending in $table
| string | Tablename (_FILE for files) | |
| mixed | "destination": can be positive or negative indicating how the paste is done (paste into / paste after) | |
| boolean | If set, then the redirect URL will point back to the current script, but with CB reset. |
Definition at line 564 of file class.t3lib_clipboard.php.
| t3lib_clipboard::deleteUrl | ( | $ | setRedirect = 1, |
|
| $ | file = 0 | |||
| ) |
deleteUrl for current pad
| boolean | If set, then the redirect URL will point back to the current script, but with CB reset. | |
| boolean | If set, then the URL will link to the tce_file.php script in the typo3/ dir. |
Definition at line 581 of file class.t3lib_clipboard.php.
| t3lib_clipboard::editUrl | ( | ) |
editUrl of all current elements ONLY database Links to alt_doc.php
Definition at line 598 of file class.t3lib_clipboard.php.
| t3lib_clipboard::removeUrl | ( | $ | table, | |
| $ | uid | |||
| ) |
Returns the remove-url (file and db) for file $table='_FILE' and $uid = shortmd5 hash of path
| string | Tablename | |
| string | uid integer/shortmd5 hash |
Definition at line 619 of file class.t3lib_clipboard.php.
| t3lib_clipboard::confirmMsg | ( | $ | table, | |
| $ | rec, | |||
| $ | type, | |||
| $ | clElements | |||
| ) |
Returns confirm JavaScript message
| string | Table name | |
| mixed | For records its an array, for files its a string (path) | |
| string | Type-code | |
| array | Array of selected elements |
Definition at line 632 of file class.t3lib_clipboard.php.
| t3lib_clipboard::clLabel | ( | $ | key, | |
| $ | Akey = 'labels' | |||
| ) |
Clipboard label - getting from "EXT:lang/locallang_core.php:"
| string | Label Key | |
| string | Alternative key to "labels" |
Definition at line 680 of file class.t3lib_clipboard.php.
| t3lib_clipboard::exportClipElementParameters | ( | ) |
Creates GET parameters for linking to the export module.
Definition at line 689 of file class.t3lib_clipboard.php.
| t3lib_clipboard::removeElement | ( | $ | el | ) |
Removes element on clipboard
| string | Key of element in ->clipData array |
Definition at line 739 of file class.t3lib_clipboard.php.
| t3lib_clipboard::saveClipboard | ( | ) |
Saves the clipboard, no questions asked. Use ->endClipboard normally (as it checks if changes has been done so saving is necessary)
Definition at line 751 of file class.t3lib_clipboard.php.
| t3lib_clipboard::currentMode | ( | ) |
Returns the current mode, 'copy' or 'cut'
Definition at line 761 of file class.t3lib_clipboard.php.
| t3lib_clipboard::cleanCurrent | ( | ) |
This traverses the elements on the current clipboard pane and unsets elements which does not exist anymore or are disabled.
Definition at line 771 of file class.t3lib_clipboard.php.
| t3lib_clipboard::elFromTable | ( | $ | matchTable = '', |
|
| $ | pad = '' | |||
| ) |
Counts the number of elements from the table $matchTable. If $matchTable is blank, all tables (except '_FILE' of course) is counted.
| string | Table to match/count for. | |
| string | $pad can optionally be used to set another pad than the current. |
Definition at line 798 of file class.t3lib_clipboard.php.
| t3lib_clipboard::isSelected | ( | $ | table, | |
| $ | uid | |||
| ) |
Verifies if the item $table/$uid is on the current pad. If the pad is "normal", the mode value is returned if the element existed. Thus you'll know if the item was copy or cut moded...
| string | Table name, (_FILE for files...) | |
| integer | Element uid (path for files) |
Definition at line 829 of file class.t3lib_clipboard.php.
| t3lib_clipboard::getSelectedRecord | ( | $ | table = '', |
|
| $ | uid = '' | |||
| ) |
Returns item record $table,$uid if selected on current clipboard If table and uid is blank, the first element is returned. Makes sense only for DB records - not files!
| string | Table name | |
| integer | Element uid |
Definition at line 843 of file class.t3lib_clipboard.php.
| t3lib_clipboard::isElements | ( | ) |
Reports if the current pad has elements (does not check file/DB type OR if file/DBrecord exists or not. Only counting array)
Definition at line 861 of file class.t3lib_clipboard.php.
| t3lib_clipboard::makePasteCmdArray | ( | $ | ref, | |
| $ | CMD | |||
| ) |
Applies the proper paste configuration in the $cmd array send to tce_db.php. $ref is the target, see description below. The current pad is pasted
$ref: [tablename]:[paste-uid]. tablename is the name of the table from which elements *on the current clipboard* is pasted with the 'pid' paste-uid. No tablename means that all items on the clipboard (non-files) are pasted. This requires paste-uid to be positive though. so 'tt_content:-3' means 'paste tt_content elements on the clipboard to AFTER tt_content:3 record 'tt_content:30' means 'paste tt_content elements on the clipboard into page with id 30 ':30' means 'paste ALL database elements on the clipboard into page with id 30 ':-30' not valid.
| string | [tablename]:[paste-uid], see description | |
| array | Command-array |
Definition at line 902 of file class.t3lib_clipboard.php.
| t3lib_clipboard::makeDeleteCmdArray | ( | $ | CMD | ) |
Delete record entries in CMD array
| array | Command-array |
Definition at line 931 of file class.t3lib_clipboard.php.
| t3lib_clipboard::makePasteCmdArray_file | ( | $ | ref, | |
| $ | FILE | |||
| ) |
Applies the proper paste configuration in the $file array send to tce_file.php. The current pad is pasted
| string | Reference to element (splitted by "|") | |
| array | Command-array |
Definition at line 974 of file class.t3lib_clipboard.php.
| t3lib_clipboard::makeDeleteCmdArray_file | ( | $ | FILE | ) |
Delete files in CMD array
| array | Command-array |
Definition at line 996 of file class.t3lib_clipboard.php.
| t3lib_clipboard::$clipData = array() |
Clipboard data kept here
Keys: 'normal' 'tab_[x]' where x is >=1 and denotes the pad-number \ 'mode' : 'copy' means copy-mode, default = moving ('cut') \ 'el' : Array of elements: DB: keys = '[tablename]|[uid]' eg. 'tt_content:123' DB: values = 1 (basically insignificant) FILE: keys = '_FILE|[shortmd5 of path]' eg. '_FILE|9ebc7e5c74' FILE: values = The full filepath, eg. '/www/htdocs/typo3/32/dummy/fileadmin/sem1_3_examples/alternative_index.php' or 'C:/www/htdocs/typo3/32/dummy/fileadmin/sem1_3_examples/alternative_index.php'
'current' pointer to current tab (among the above...) '_setThumb' boolean: If set, file thumbnails are shown.
The virtual tablename '_FILE' will always indicate files/folders. When checking for elements from eg. 'all tables' (by using an empty string) '_FILE' entries are excluded (so in effect only DB elements are counted)
Definition at line 119 of file class.t3lib_clipboard.php.