trait RoleExtension

RoleExtension trait.

This extension is supposed to be applied to Client class which provides a fetchResource method.

Methods

getRole(string $spaceId, string $roleId)

Returns a Role resource.

getRoles(string $spaceId, Query $query = null)

Returns a ResourceArray object containing Role resources.

ResourceInterface|ResourceArray
fetchResource(string $class, array $parameters, Query $query = null, ResourceInterface $resource = null)

No description

Details

at line 33
getRole(string $spaceId, string $roleId)

Returns a Role resource.

Parameters

string $spaceId
string $roleId

See also

https://www.contentful.com/developers/docs/references/content-management-api/#/reference/roles/role

at line 46
getRoles(string $spaceId, Query $query = null)

Returns a ResourceArray object containing Role resources.

Parameters

string $spaceId
Query $query

See also

https://www.contentful.com/developers/docs/references/content-management-api/#/reference/roles/roles-collection

at line 26
ResourceInterface|ResourceArray fetchResource(string $class, array $parameters, Query $query = null, ResourceInterface $resource = null)

Parameters

string $class
array $parameters
Query $query
ResourceInterface $resource

Return Value

ResourceInterface|ResourceArray