Nextcloud PHP API (master)

ITeamOwnedResourceProvider extends ITeamResourceProvider

A team resource provider with app-owned navigation and optional embedded views on the Teams page.

Register the implementation with IRegistrationContext::registerTeamResourceProvider().

Tags
since
36.0.0
Attributes
#[Implementable]
$since: '36.0.0'

Table of Contents

Methods

canCreateResource()  : bool
Check whether this provider can create a resource for the current team and user.
createResource()  : string
Create a team-owned resource and return its navigation entry ID.
getIconSvg()  : string
Svg icon to show next to the provider (app icon)
getId()  : string
Unique identifier used to identify the provider (app id)
getName()  : string
User visible name of the provider (app name)
getOwnedByTeam()  : array<int, TeamResource>
Return the app's team-owned navigation resources for this team. A resource's URL opens the app; its optional reference URL is used for embedded previews.
getSharedWith()  : array<string|int, TeamResource>
Return all resources that are shared to the given team id for the current provider
getTeamsForResource()  : array<string|int, string>
Return team ids that a resource is shared with or owned by
isSharedWithTeam()  : bool
Check if a resource is shared with the given team

Methods

canCreateResource()

Check whether this provider can create a resource for the current team and user.

public canCreateResource(string $teamId, string $userId, bool $isAdmin, TeamFolder|null $folder) : bool
Parameters
$teamId : string
$userId : string
$isAdmin : bool
$folder : TeamFolder|null
Tags
since
36.0.0
Return values
bool

createResource()

Create a team-owned resource and return its navigation entry ID.

public createResource(string $teamId, string $teamName, string $userId, bool $isAdmin, TeamFolder|null $folder) : string
Parameters
$teamId : string
$teamName : string
$userId : string
$isAdmin : bool
$folder : TeamFolder|null
Tags
since
36.0.0
Return values
string —

The ID of the new navigation entry.

getIconSvg()

Svg icon to show next to the provider (app icon)

public getIconSvg() : string
Tags
since
29.0.0
Return values
string

getId()

Unique identifier used to identify the provider (app id)

public getId() : string
Tags
since
29.0.0
Return values
string

getName()

User visible name of the provider (app name)

public getName() : string
Tags
since
29.0.0
Return values
string

getOwnedByTeam()

Return the app's team-owned navigation resources for this team. A resource's URL opens the app; its optional reference URL is used for embedded previews.

public getOwnedByTeam(string $teamId, string $userId, bool $isAdmin, TeamFolder|null $folder) : array<int, TeamResource>

When no reference URL is provided, the navigation URL is resolved instead.

Parameters
$teamId : string
$userId : string
$isAdmin : bool
$folder : TeamFolder|null
Tags
since
36.0.0
Return values
array<int, TeamResource>

getSharedWith()

Return all resources that are shared to the given team id for the current provider

public getSharedWith(string $teamId) : array<string|int, TeamResource>
Parameters
$teamId : string
Tags
since
29.0.0
Return values
array<string|int, TeamResource>

getTeamsForResource()

Return team ids that a resource is shared with or owned by

public getTeamsForResource(string $resourceId) : array<string|int, string>
Parameters
$resourceId : string
Tags
since
29.0.0
Return values
array<string|int, string>

isSharedWithTeam()

Check if a resource is shared with the given team

public isSharedWithTeam(string $teamId, string $resourceId) : bool
Parameters
$teamId : string
$resourceId : string
Tags
since
29.0.0
Return values
bool
On this page

Search results