@@ 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)->json(); |
|
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)->json(); |
|
78 | } |
|
79 | } |
|
80 |