trait LocaleExtension

LocaleExtension trait.

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

Methods

getLocale(string $spaceId, string $environmentId, string $localeId)

Returns a Locale resource.

getLocales(string $spaceId, string $environmentId)

Returns a ResourceArray object containing Locale resources.

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

No description

Details

at line 33
getLocale(string $spaceId, string $environmentId, string $localeId)

Returns a Locale resource.

Parameters

string $spaceId
string $environmentId
string $localeId

See also

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

at line 47
getLocales(string $spaceId, string $environmentId)

Returns a ResourceArray object containing Locale resources.

Parameters

string $spaceId
string $environmentId

See also

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