@@ 32-50 (lines=19) @@ | ||
29 | * supports version-specific filing. Defaults to <code>true</code>. |
|
30 | * @param ExtensionDataInterface|null $extension |
|
31 | */ |
|
32 | public function addObjectToFolder( |
|
33 | $repositoryId, |
|
34 | $objectId, |
|
35 | $folderId, |
|
36 | $allVersions = true, |
|
37 | ExtensionDataInterface $extension = null |
|
38 | ) |
|
39 | { |
|
40 | $url = $this->getObjectUrl($repositoryId, $objectId); |
|
41 | ||
42 | $queryArray = array( |
|
43 | Constants::CONTROL_CMISACTION => Constants::CMISACTION_ADD_OBJECT_TO_FOLDER, |
|
44 | Constants::PARAM_SUCCINCT => $this->getSuccinct() ? 'true' : 'false', |
|
45 | Constants::PARAM_FOLDER_ID => $folderId, |
|
46 | Constants::PARAM_ALL_VERSIONS => $allVersions ? 'true' : 'false', |
|
47 | ); |
|
48 | ||
49 | $this->post($url, $queryArray); |
|
50 | } |
|
51 | ||
52 | /** |
|
53 | * Removes an existing fileable non-folder object from a folder. |
|
@@ 62-78 (lines=17) @@ | ||
59 | * currently filed. |
|
60 | * @param ExtensionDataInterface|null $extension |
|
61 | */ |
|
62 | public function removeObjectFromFolder( |
|
63 | $repositoryId, |
|
64 | $objectId, |
|
65 | $folderId = null, |
|
66 | ExtensionDataInterface $extension = null |
|
67 | ) |
|
68 | { |
|
69 | $url = $this->getObjectUrl($repositoryId, $objectId); |
|
70 | ||
71 | $queryArray = array( |
|
72 | Constants::CONTROL_CMISACTION => Constants::CMISACTION_REMOVE_OBJECT_FROM_FOLDER, |
|
73 | Constants::PARAM_SUCCINCT => $this->getSuccinct() ? 'true' : 'false', |
|
74 | Constants::PARAM_FOLDER_ID => $folderId, |
|
75 | ); |
|
76 | ||
77 | $this->post($url, $queryArray); |
|
78 | } |
|
79 | } |
|
80 |
@@ 488-504 (lines=17) @@ | ||
485 | * the document object specified (default is <code>true</code>) |
|
486 | * @param ExtensionDataInterface|null $extension |
|
487 | */ |
|
488 | public function deleteObject( |
|
489 | $repositoryId, |
|
490 | $objectId, |
|
491 | $allVersions = true, |
|
492 | ExtensionDataInterface $extension = null |
|
493 | ) { |
|
494 | $url = $this->getObjectUrl($repositoryId, $objectId); |
|
495 | $url->getQuery()->modify( |
|
496 | array( |
|
497 | Constants::CONTROL_CMISACTION => Constants::CMISACTION_DELETE, |
|
498 | Constants::PARAM_ALL_VERSIONS => $allVersions ? 'true' : 'false', |
|
499 | ) |
|
500 | ); |
|
501 | ||
502 | $this->post($url); |
|
503 | $this->flushCached(); |
|
504 | } |
|
505 | ||
506 | /** |
|
507 | * Deletes the specified folder object and all of its child- and descendant-objects. |