mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-11 20:21:16 +00:00
add method isOnClipboard()
This commit is contained in:
parent
dee29cb64f
commit
9a3f217e45
|
@ -286,6 +286,24 @@ class SeedDMS_Session {
|
|||
return (array) $this->data['clipboard'];
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
* Check if object is on clipboard
|
||||
*
|
||||
* @param object $object Document or folder
|
||||
*/
|
||||
function isOnClipboard($object) { /* {{{ */
|
||||
/* id is only set if load() was called before */
|
||||
if($this->id) {
|
||||
$dms = $object->getDMS();
|
||||
if($object->isType('document')) {
|
||||
return in_array($object->getID(), $this->data['clipboard']['docs']);
|
||||
} elseif($object->isType('folder')) {
|
||||
return in_array($object->getID(), $this->data['clipboard']['folders']);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
* Add to clipboard of session
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue
Block a user