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 | ||
protected string | $sourceEnv |
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 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 82
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 77
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.
in DeletableTrait at line 28
delete()
Deletes the current resource.
at line 117
protected
getSpaceId()
{@inheritdoc}
at line 125
protected
getEnvironmentId()
{@inheritdoc}
in EnvironmentProxyExtension at line 56
getAsset(string $assetId)
Returns an Asset resource.
in EnvironmentProxyExtension at line 70
getAssets(Query $query = null)
Returns a ResourceArray object which contains Asset resources.
in EnvironmentProxyExtension at line 84
getContentType(string $contentTypeId)
Returns a ContentType resource.
in EnvironmentProxyExtension at line 98
getContentTypes(Query $query = null)
Returns a ResourceArray object which contains ContentType resources.
in EnvironmentProxyExtension at line 112
getPublishedContentType(string $contentTypeId)
Returns a published ContentType resource.
in EnvironmentProxyExtension at line 126
getPublishedContentTypes(Query $query = null)
Returns a ResourceArray object which contains published ContentType resources.
in EnvironmentProxyExtension at line 140
getContentTypeSnapshot(string $contentTypeId, string $snapshotId)
Returns a ContentTypeSnapshot resource.
in EnvironmentProxyExtension at line 155
getContentTypeSnapshots(string $contentTypeId, Query $query = null)
Returns a ResourceArray object which contains ContentTypeSnapshot resources.
in EnvironmentProxyExtension at line 170
getEditorInterface(string $contentTypeId)
Returns an EditorInterface resource.
in EnvironmentProxyExtension at line 184
getEntry(string $entryId)
Returns an Entry resource.
in EnvironmentProxyExtension at line 198
getEntries(Query $query = null)
Returns a ResourceArray object which contains Entry resources.
in EnvironmentProxyExtension at line 212
getEntrySnapshot(string $entryId, string $snapshotId)
Returns a EntrySnapshot resource.
in EnvironmentProxyExtension at line 227
getEntrySnapshots(string $entryId, Query $query = null)
Returns a ResourceArray object which contains EntrySnapshot resources.
in EnvironmentProxyExtension at line 242
getExtension(string $extensionId)
Returns an Extension resource.
in EnvironmentProxyExtension at line 256
getExtensions()
Returns a ResourceArray object containing Extension resources.
in EnvironmentProxyExtension at line 269
getLocale(string $localeId)
Returns a Locale resource.
in EnvironmentProxyExtension at line 283
getLocales()
Returns a ResourceArray object containing Locale resources.
in UpdatableTrait at line 40
update()
Updates the current resource.
at line 63
getSystemProperties()
{@inheritdoc}
at line 54
__construct(string $name, $source_environment_id = '')
Environment constructor.
at line 71
jsonSerialize()
{@inheritdoc}
at line 94
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 105
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.