ITeamOwnedResourceProvider
extends
ITeamResourceProvider
in
A team resource provider with app-owned navigation and optional embedded views on the Teams page.
Register the implementation with IRegistrationContext::registerTeamResourceProvider().
Tags
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
Return values
boolcreateResource()
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
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
Return values
stringgetId()
Unique identifier used to identify the provider (app id)
public
getId() : string
Tags
Return values
stringgetName()
User visible name of the provider (app name)
public
getName() : string
Tags
Return values
stringgetOwnedByTeam()
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
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
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
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