trait ContentTypeProxyExtension

ContentTypeProxyExtension trait.

This trait is an extension to the ContentType 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 a content type.

Properties

Client $client

Methods

string
getSpaceId()

Returns the ID associated to the current space.

string
getEnvironmentId()

Returns the ID associated to the current environment.

string
getContentTypeId()

Returns the ID associated to the current content type.

getSnapshot(string $snapshotId)

Returns a ContentTypeSnapshot resource.

ResourceArray
getSnapshots(Query $query = null)

Returns a ResourceArray object which contains ContentTypeSnapshot resources.

getEditorInterface()

Returns an EditorInterface resource.

Details

at line 35
abstract protected string getSpaceId()

Returns the ID associated to the current space.

Return Value

string

at line 42
abstract protected string getEnvironmentId()

Returns the ID associated to the current environment.

Return Value

string

at line 49
abstract protected string getContentTypeId()

Returns the ID associated to the current content type.

Return Value

string

at line 60
ContentTypeSnapshot getSnapshot(string $snapshotId)

Returns a ContentTypeSnapshot resource.

Parameters

string $snapshotId

Return Value

ContentTypeSnapshot

See also

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

at line 79
ResourceArray getSnapshots(Query $query = null)

Returns a ResourceArray object which contains ContentTypeSnapshot resources.

Parameters

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 96
EditorInterface getEditorInterface()

Returns an EditorInterface resource.

Return Value

EditorInterface

See also

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