trait EnvironmentProxyExtension

EnvironmentProxyExtension trait.

This trait is an extension to the Environment resource class. It is built here and included as a trait to better separate concerns. This trait provides shortcuts for fetching resources that belong to an environment.

Properties

Client $client

Methods

string
getSpaceId()

Returns the ID associated to the current space.

string
getEnvironmentId()

Returns the ID associated to the current environment.

getAsset(string $assetId)

Returns an Asset resource.

ResourceArray
getAssets(Query $query = null)

Returns a ResourceArray object which contains Asset resources.

getContentType(string $contentTypeId)

Returns a ContentType resource.

ResourceArray
getContentTypes(Query $query = null)

Returns a ResourceArray object which contains ContentType resources.

getPublishedContentType(string $contentTypeId)

Returns a published ContentType resource.

ResourceArray
getPublishedContentTypes(Query $query = null)

Returns a ResourceArray object which contains published ContentType resources.

getContentTypeSnapshot(string $contentTypeId, string $snapshotId)

Returns a ContentTypeSnapshot resource.

ResourceArray
getContentTypeSnapshots(string $contentTypeId, Query $query = null)

Returns a ResourceArray object which contains ContentTypeSnapshot resources.

getEditorInterface(string $contentTypeId)

Returns an EditorInterface resource.

getEntry(string $entryId)

Returns an Entry resource.

ResourceArray
getEntries(Query $query = null)

Returns a ResourceArray object which contains Entry resources.

getEntrySnapshot(string $entryId, string $snapshotId)

Returns a EntrySnapshot resource.

ResourceArray
getEntrySnapshots(string $entryId, Query $query = null)

Returns a ResourceArray object which contains EntrySnapshot resources.

getExtension(string $extensionId)

Returns an Extension resource.

ResourceArray
getExtensions()

Returns a ResourceArray object containing Extension resources.

getLocale(string $localeId)

Returns a Locale resource.

ResourceArray
getLocales()

Returns a ResourceArray object containing Locale resources.

Details

at line 41
abstract protected string getSpaceId()

Returns the ID associated to the current space.

Return Value

string

at line 48
abstract protected string getEnvironmentId()

Returns the ID associated to the current environment.

Return Value

string

at line 59
Asset getAsset(string $assetId)

Returns an Asset resource.

Parameters

string $assetId

Return Value

Asset

See also

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

at line 77
ResourceArray getAssets(Query $query = null)

Returns a ResourceArray object which contains Asset resources.

Parameters

Query $query

Return Value

ResourceArray

See also

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

at line 95
ContentType getContentType(string $contentTypeId)

Returns a ContentType resource.

Parameters

string $contentTypeId

Return Value

ContentType

See also

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

at line 113
ResourceArray getContentTypes(Query $query = null)

Returns a ResourceArray object which contains ContentType resources.

Parameters

Query $query

Return Value

ResourceArray

See also

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

at line 131
ContentType getPublishedContentType(string $contentTypeId)

Returns a published ContentType resource.

Parameters

string $contentTypeId

Return Value

ContentType

See also

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

at line 149
ResourceArray getPublishedContentTypes(Query $query = null)

Returns a ResourceArray object which contains published ContentType resources.

Parameters

Query $query

Return Value

ResourceArray

See also

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

at line 168
ContentTypeSnapshot getContentTypeSnapshot(string $contentTypeId, string $snapshotId)

Returns a ContentTypeSnapshot resource.

Parameters

string $contentTypeId
string $snapshotId

Return Value

ContentTypeSnapshot

See also

https://www.contentful.com/developers/docs/references/content-management-api/#/reference/snapshots/content-type-snapshot

at line 188
ResourceArray getContentTypeSnapshots(string $contentTypeId, Query $query = null)

Returns a ResourceArray object which contains ContentTypeSnapshot resources.

Parameters

string $contentTypeId
Query $query

Return Value

ResourceArray

See also

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

at line 207
EditorInterface getEditorInterface(string $contentTypeId)

Returns an EditorInterface resource.

Parameters

string $contentTypeId

Return Value

EditorInterface

See also

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

at line 225
Entry getEntry(string $entryId)

Returns an Entry resource.

Parameters

string $entryId

Return Value

Entry

See also

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

at line 243
ResourceArray getEntries(Query $query = null)

Returns a ResourceArray object which contains Entry resources.

Parameters

Query $query

Return Value

ResourceArray

See also

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

at line 262
EntrySnapshot getEntrySnapshot(string $entryId, string $snapshotId)

Returns a EntrySnapshot resource.

Parameters

string $entryId
string $snapshotId

Return Value

EntrySnapshot

See also

https://www.contentful.com/developers/docs/references/content-management-api/#/reference/snapshots/entry-snapshot

at line 282
ResourceArray getEntrySnapshots(string $entryId, Query $query = null)

Returns a ResourceArray object which contains EntrySnapshot resources.

Parameters

string $entryId
Query $query

Return Value

ResourceArray

See also

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

at line 301
Extension getExtension(string $extensionId)

Returns an Extension resource.

Parameters

string $extensionId

Return Value

Extension

See also

https://www.contentful.com/developers/docs/references/content-management-api/#/reference/ui-extensions/extension

at line 317
ResourceArray getExtensions()

Returns a ResourceArray object containing Extension resources.

Return Value

ResourceArray

See also

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

at line 334
Locale getLocale(string $localeId)

Returns a Locale resource.

Parameters

string $localeId

Return Value

Locale

See also

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

at line 350
ResourceArray getLocales()

Returns a ResourceArray object containing Locale resources.

Return Value

ResourceArray

See also

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