Environment
class Environment extends BaseResource implements CreatableInterface
Environment class.
This class represents a resource with type "Environment" in Contentful.
Traits
Properties
protected Environment | $sys | ||
Client | $client | from UpdatableTrait | |
protected string | $name |
Methods
Returns the resource in the form of request body.
{@inheritdoc}
{@inheritdoc}
Returns a ContentType resource.
Returns a ResourceArray object which contains ContentType resources.
Returns a published ContentType resource.
Returns a ResourceArray object which contains published ContentType resources.
Returns a ContentTypeSnapshot resource.
Returns a ResourceArray object which contains ContentTypeSnapshot resources.
Returns an EditorInterface resource.
Returns a EntrySnapshot resource.
Returns a ResourceArray object which contains EntrySnapshot resources.
Returns an Extension resource.
Returns a ResourceArray object containing Extension resources.
Returns a ResourceArray object containing Locale resources.
{@inheritdoc}
Environment constructor.
{@inheritdoc}
Returns an associative array where keys are the name of the fragments in a URI, and the values are the corresponding IDs.
Returns an array of headers that the current resource needs to sent for being created.
No description
No description
Details
in BaseResource at line 37
getId()
{@inheritdoc}
in BaseResource at line 45
getType()
{@inheritdoc}
in BaseResource at line 53
asLink()
{@inheritdoc}
at line 76
mixed
asRequestBody()
Returns the resource in the form of request body.
This can differ from regular serialization, as some fields may not be present in the request payload.
in BaseResource at line 79
BaseResource
setClient(Client $client)
Sets the current Client object instance.
This is done automatically when performing API calls, so it shouldn't be used manually.
at line 107
protected
getSpaceId()
{@inheritdoc}
at line 115
protected
getEnvironmentId()
{@inheritdoc}
in EnvironmentProxyExtension at line 60
Asset
getAsset(string $assetId)
Returns an Asset resource.
in EnvironmentProxyExtension at line 78
ResourceArray
getAssets(Query $query = \null)
Returns a ResourceArray object which contains Asset resources.
in EnvironmentProxyExtension at line 96
ContentType
getContentType(string $contentTypeId)
Returns a ContentType resource.
in EnvironmentProxyExtension at line 114
ResourceArray
getContentTypes(Query $query = \null)
Returns a ResourceArray object which contains ContentType resources.
in EnvironmentProxyExtension at line 132
ContentType
getPublishedContentType(string $contentTypeId)
Returns a published ContentType resource.
in EnvironmentProxyExtension at line 150
ResourceArray
getPublishedContentTypes(Query $query = \null)
Returns a ResourceArray object which contains published ContentType resources.
in EnvironmentProxyExtension at line 169
ContentTypeSnapshot
getContentTypeSnapshot(string $contentTypeId, string $snapshotId)
Returns a ContentTypeSnapshot resource.
in EnvironmentProxyExtension at line 189
ResourceArray
getContentTypeSnapshots(string $contentTypeId, Query $query = \null)
Returns a ResourceArray object which contains ContentTypeSnapshot resources.
in EnvironmentProxyExtension at line 208
EditorInterface
getEditorInterface(string $contentTypeId)
Returns an EditorInterface resource.
in EnvironmentProxyExtension at line 226
Entry
getEntry(string $entryId)
Returns an Entry resource.
in EnvironmentProxyExtension at line 244
ResourceArray
getEntries(Query $query = \null)
Returns a ResourceArray object which contains Entry resources.
in EnvironmentProxyExtension at line 263
EntrySnapshot
getEntrySnapshot(string $entryId, string $snapshotId)
Returns a EntrySnapshot resource.
in EnvironmentProxyExtension at line 283
ResourceArray
getEntrySnapshots(string $entryId, Query $query = \null)
Returns a ResourceArray object which contains EntrySnapshot resources.
in EnvironmentProxyExtension at line 302
Extension
getExtension(string $extensionId)
Returns an Extension resource.
in EnvironmentProxyExtension at line 318
ResourceArray
getExtensions()
Returns a ResourceArray object containing Extension resources.
in EnvironmentProxyExtension at line 335
Locale
getLocale(string $localeId)
Returns a Locale resource.
in EnvironmentProxyExtension at line 351
ResourceArray
getLocales()
Returns a ResourceArray object containing Locale resources.
in DeletableTrait at line 28
delete()
Deletes the current resource.
in UpdatableTrait at line 40
update()
Updates the current resource.
at line 57
getSystemProperties()
{@inheritdoc}
at line 49
__construct(string $name)
Environment constructor.
at line 65
jsonSerialize()
{@inheritdoc}
at line 88
string[]
asUriParameters()
Returns an associative array where keys are the name of the fragments in a URI, and the values are the corresponding IDs.
at line 99
string[]
getHeadersForCreation()
Returns an array of headers that the current resource needs to sent for being created.
This method is supposed to be overridden if necessary.