Extension
class Extension extends BaseResource implements CreatableInterface
Extension class.
This class represents a resource with type "Extension" in Contentful.
Traits
Properties
protected Extension | $sys | ||
Client | $client | from UpdatableTrait | |
protected string | $name | ||
protected string | $source | ||
protected FieldType[] | $fieldTypes | ||
protected bool | $sidebar | ||
protected Parameter[] | $installationParameters | ||
protected Parameter[] | $instanceParameters |
Methods
{@inheritdoc}
Extension construct.
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
Shortcut for adding a new field type.
No description
No description
No description
No description
{@inheritdoc}
Details
in BaseResource at line 37
getId()
{@inheritdoc}
in BaseResource at line 45
getType()
{@inheritdoc}
in BaseResource at line 53
asLink()
{@inheritdoc}
in UpdatableTrait at line 35
abstract 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.
in DeletableTrait at line 28
delete()
Deletes the current resource.
in UpdatableTrait at line 40
update()
Updates the current resource.
at line 82
getSystemProperties()
{@inheritdoc}
at line 74
__construct(string $name = '')
Extension construct.
at line 90
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 102
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.
at line 110
string
getName()
at line 120
Extension
setName(string $name)
at line 130
string
getSource()
at line 140
Extension
setSource(string $source)
at line 150
FieldType[]
getFieldTypes()
at line 160
Extension
setFieldTypes(array $fieldTypes)
at line 189
Extension
addNewFieldType(string $type, array $options = [])
Shortcut for adding a new field type.
at line 197
bool
isSidebar()
at line 207
Extension
setSidebar(bool $sidebar)
at line 217
Parameter[]
getInstallationParameters()
at line 249
Parameter[]
getInstanceParameters()
at line 281
jsonSerialize()
{@inheritdoc}