final class SharepointSearchService implements SharepointSearchServiceInterface

Searches SharePoint files via the Microsoft Graph API.

Methods

__construct(GraphService $graphService)

No description

array
search(string $query, bool $documentsOnly = FALSE)

Searches SharePoint for files matching the given query.

Details

at line 14
__construct(GraphService $graphService)

No description

Parameters

GraphService $graphService

Searches SharePoint for files matching the given query.

Parameters

string $query

The search term (must be sanitized by the caller before passing).

bool $documentsOnly

TRUE to restrict results to linkable documents (excludes folders). FALSE returns all drive items including folders.

Return Value

array

The raw Graph API response array, or an empty array on failure.