Locale
class Locale extends BaseResource implements CreatableInterface
Locale class.
This class represents a resource with type "Locale" in Contentful.
Traits
Properties
protected Locale | $sys | ||
Client | $client | from UpdatableTrait | |
protected string | $name | ||
protected string | $code | ||
protected string|null | $fallbackCode | ||
protected bool | $contentDeliveryApi | ||
protected bool | $contentManagementApi | ||
protected bool | $default | ||
protected bool | $optional |
Methods
Returns the resource in the form of request body.
{@inheritdoc}
Locale 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
No description
No description
No description
No description
No description
No description
No description
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 111
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.
in UpdatableTrait at line 40
update()
Updates the current resource.
at line 86
getSystemProperties()
{@inheritdoc}
at line 76
__construct(string $name, string $code, string $fallbackCode = null)
Locale constructor.
at line 94
jsonSerialize()
{@inheritdoc}
at line 125
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 137
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.