trait AssetExtension

AssetExtension trait.

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

Methods

getAsset(string $spaceId, string $environmentId, string $assetId)

Returns an Asset resource.

getAssets(string $spaceId, string $environmentId, Query $query = null)

Returns a ResourceArray object which contains Asset resources.

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

No description

Details

at line 33
getAsset(string $spaceId, string $environmentId, string $assetId)

Returns an Asset resource.

Parameters

string $spaceId
string $environmentId
string $assetId

See also

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

at line 47
getAssets(string $spaceId, string $environmentId, Query $query = null)

Returns a ResourceArray object which contains Asset resources.

Parameters

string $spaceId
string $environmentId
Query $query

See also

https://www.contentful.com/developers/docs/references/content-management-api/#/reference/assets/assets-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