class GetFilesAndFoldersService implements GetFilesAndFoldersServiceInterface

Class used to retrieve folder listings from onedrive.

Properties

protected array|bool $drive

The drive array with all the values.

protected GraphService $graphService

Drupal\o365\GraphService definition.

Methods

__construct(GraphService $o365_graph)

Constructs a new GetFilesAndFoldersService object.

mixed
listFilesAndFolders(mixed $folder = FALSE)

List all files and folders.

array|mixed
listSharedFilesAndFolders(int $limit = 10)

List all the shared files and folders.

array|mixed
listSpecialFilesAndFolders(string $type, int $limit = 5)

Get a list of special files and folders. For instance the recent files.

array
renderFileList(int $limit = 5)

Render the list of files and folders.

Details

at line 33
__construct(GraphService $o365_graph)

Constructs a new GetFilesAndFoldersService object.

Parameters

GraphService $o365_graph

The GraphService definition.

at line 40
mixed listFilesAndFolders(mixed $folder = FALSE)

List all files and folders.

Parameters

mixed $folder

The ID of a folder or FALSE for the root.

Return Value

mixed

The list of files and folders.

Exceptions

TempStoreException
IdentityProviderException
GraphException

at line 53
array|mixed listSharedFilesAndFolders(int $limit = 10)

List all the shared files and folders.

Parameters

int $limit

The max amount of items to return.

Return Value

array|mixed

The list of files and folders.

Exceptions

TempStoreException
IdentityProviderException
GraphException

at line 63
array|mixed listSpecialFilesAndFolders(string $type, int $limit = 5)

Get a list of special files and folders. For instance the recent files.

Parameters

string $type

The special type.

int $limit

The number of files to get.

Return Value

array|mixed

The list of files and folders.

Exceptions

TempStoreException
IdentityProviderException
GraphException

at line 94
protected array renderFileList(int $limit = 5)

Render the list of files and folders.

Parameters

int $limit

The amount of items to show.

Return Value

array

The render array for the files and folders.