![]() |
Xataface 2.0
Xataface Application Framework
|
Public Member Functions | |
Dataface_Clipboard ($id) | |
isInstalled () | |
install () | |
clean () | |
shotgunClean () | |
empty () | |
copy ($recordids) | |
cut ($recordids) | |
paste ($destid, $relationship=null) | |
logError ($error) | |
logWarning ($warning) | |
logMessage ($message) | |
clearLogs () | |
Static Public Member Functions | |
static & | getInstance () |
Data Fields | |
$id | |
$errors | |
$warnings | |
$messages |
A clipboard class to enable users to cut and paste records between relationships and tables.
Definition at line 13 of file Clipboard.php.
clean | ( | ) |
Cleans out old entries from the clipboard. static
Definition at line 66 of file Clipboard.php.
clearLogs | ( | ) |
Definition at line 278 of file Clipboard.php.
copy | ( | $ | recordids | ) |
Copies the given record onto the clipboard.
This takes multilingual issues into account so that transation records in translation tables will also be copied.
array | $recordids | Array of record ids of the records to copy. Record ids follow the pattern: table/relationship?key1=val1&key2=val2&relationship::key1=val1&relationship::key2=val2 |
Definition at line 141 of file Clipboard.php.
cut | ( | $ | recordids | ) |
Cuts a record and stores it on the clipboard. This won't erase the record until it is pasted.
array | $recordids |
Definition at line 167 of file Clipboard.php.
Dataface_Clipboard | ( | $ | id | ) |
Definition at line 20 of file Clipboard.php.
empty | ( | ) |
Indicates whether the clipboard is empty.
Definition at line 125 of file Clipboard.php.
static& getInstance | ( | ) | [static] |
Obtains a reference to the clipboard instance.
Definition at line 94 of file Clipboard.php.
install | ( | ) |
Installs the clipboard by creating a table named '_df_clipboard' in the database to store the clipped items. static
Definition at line 43 of file Clipboard.php.
isInstalled | ( | ) |
Checks whether the clipboard is currently installed. staticlutie
Definition at line 28 of file Clipboard.php.
logError | ( | $ | error | ) |
Definition at line 266 of file Clipboard.php.
logMessage | ( | $ | message | ) |
Definition at line 274 of file Clipboard.php.
logWarning | ( | $ | warning | ) |
Definition at line 270 of file Clipboard.php.
paste | ( | $ | destid, |
$ | relationship = null |
||
) |
Pastes a record from the clipboard into a new location. The new location may be a table or in a relationship with another record.
string | $destid | The id of the destination record. |
string | $relationship | The name of the relationship into which the clipboard contents should be pasted. If none is provided the contents will be pasted into the relationship designated as the chldren relationship. |
Definition at line 196 of file Clipboard.php.
shotgunClean | ( | ) |
Cleans the old entries from the clipboard using a shotgun approach. This generates a random number betweenm 0 and 100 and cleans the clipboard only if the number is above the threshold defined in the Dataface_Clipboard_threshold constant. static
Definition at line 80 of file Clipboard.php.
$errors |
Definition at line 16 of file Clipboard.php.
$id |
Definition at line 15 of file Clipboard.php.
$messages |
Definition at line 18 of file Clipboard.php.
$warnings |
Definition at line 17 of file Clipboard.php.