File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Changelog
22
3+ ## 0.5.7 - 2015-09-28
4+ * Allows the parentFolder in getFolderByDisplayName to be a folderId or a string
5+
36## 0.5.6 - 2015-09-28
47 * Added simple support for creating folders
58 * Added simple support for moving items
Original file line number Diff line number Diff line change @@ -328,19 +328,23 @@ public function getFolderByFolderId($folderId)
328328
329329 /**
330330 * @param $folderName
331- * @param string $parentFolder
331+ * @param string|Type\FolderIdType $parentFolderId
332332 * @param array $options
333333 * @return bool|Type\BaseFolderType
334334 */
335- public function getFolderByDisplayName ($ folderName , $ parentFolder = 'root ' , $ options = array ())
335+ public function getFolderByDisplayName ($ folderName , $ parentFolderId = 'root ' , $ options = array ())
336336 {
337+ if (is_string ($ parentFolderId )) {
338+ $ parentFolderId = $ this ->getFolderByDistinguishedId ($ parentFolderId )->getFolderId ();
339+ }
340+
337341 $ request = array (
338342 'Traversal ' => 'Shallow ' ,
339343 'FolderShape ' => array (
340344 'BaseShape ' => 'AllProperties '
341345 ),
342346 'ParentFolderIds ' => array (
343- 'DistinguishedFolderId ' => array ( ' Id ' => $ parentFolder )
347+ 'FolderId ' => $ parentFolderId -> toArray ( )
344348 )
345349 );
346350
You can’t perform that action at this time.
0 commit comments