Environment
class Environment extends BaseResource implements CreatableInterface
Environment class.
This class represents a resource with type "Environment" in Contentful.
Traits
Properties
SystemProperties | $sys | from UpdatableTrait | |
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.
Environment constructor.
Returns an array to be used by "json_encode" to serialize objects of this class.
Returns an associate 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 39
protected
initialize(string $type, array $sys = [])
Initialize system properties.
in BaseResource at line 48
getSystemProperties()
{@inheritdoc}
in BaseResource at line 56
getId()
{@inheritdoc}
in BaseResource at line 64
getType()
{@inheritdoc}
in BaseResource at line 72
asLink()
{@inheritdoc}
at line 64
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 98
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 95
protected
getSpaceId()
{@inheritdoc}
at line 103
protected
getEnvironmentId()
{@inheritdoc}
in EnvironmentProxyExtension at line 59
Asset
getAsset(string $assetId)
Returns an Asset resource.
in EnvironmentProxyExtension at line 77
ResourceArray
getAssets(Query $query = null)
Returns a ResourceArray object which contains Asset resources.
in EnvironmentProxyExtension at line 95
ContentType
getContentType(string $contentTypeId)
Returns a ContentType resource.
in EnvironmentProxyExtension at line 113
ResourceArray
getContentTypes(Query $query = null)
Returns a ResourceArray object which contains ContentType resources.
in EnvironmentProxyExtension at line 131
ContentType
getPublishedContentType(string $contentTypeId)
Returns a published ContentType resource.
in EnvironmentProxyExtension at line 149
ResourceArray
getPublishedContentTypes(Query $query = null)
Returns a ResourceArray object which contains published ContentType resources.
in EnvironmentProxyExtension at line 168
ContentTypeSnapshot
getContentTypeSnapshot(string $contentTypeId, string $snapshotId)
Returns a ContentTypeSnapshot resource.
in EnvironmentProxyExtension at line 188
ResourceArray
getContentTypeSnapshots(string $contentTypeId, Query $query = null)
Returns a ResourceArray object which contains ContentTypeSnapshot resources.
in EnvironmentProxyExtension at line 207
EditorInterface
getEditorInterface(string $contentTypeId)
Returns an EditorInterface resource.
in EnvironmentProxyExtension at line 225
Entry
getEntry(string $entryId)
Returns an Entry resource.
in EnvironmentProxyExtension at line 243
ResourceArray
getEntries(Query $query = null)
Returns a ResourceArray object which contains Entry resources.
in EnvironmentProxyExtension at line 262
EntrySnapshot
getEntrySnapshot(string $entryId, string $snapshotId)
Returns a EntrySnapshot resource.
in EnvironmentProxyExtension at line 282
ResourceArray
getEntrySnapshots(string $entryId, Query $query = null)
Returns a ResourceArray object which contains EntrySnapshot resources.
in EnvironmentProxyExtension at line 301
Extension
getExtension(string $extensionId)
Returns an Extension resource.
in EnvironmentProxyExtension at line 317
ResourceArray
getExtensions()
Returns a ResourceArray object containing Extension resources.
in EnvironmentProxyExtension at line 334
Locale
getLocale(string $localeId)
Returns a Locale resource.
in EnvironmentProxyExtension at line 350
ResourceArray
getLocales()
Returns a ResourceArray object containing Locale resources.
in DeletableTrait at line 29
delete()
Deletes the current resource.
in UpdatableTrait at line 38
update()
Deletes the current resource.
at line 42
__construct(string $name)
Environment constructor.
at line 53
array
jsonSerialize()
Returns an array to be used by "json_encode" to serialize objects of this class.
at line 76
string[]
asUriParameters()
Returns an associate array where keys are the name of the fragments in a URI, and the values are the corresponding IDs.
at line 87
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.