class ApiConfiguration

ApiConfiguration class.

Constants

PUBLISHED_CONTENT_TYPE_RESOURCE

Published content types are an edge case.

All resources are supposed to have one endpoint representation in the API, but content types can be present in their normal form, and in the form they have been last published as. Because of this, in order to not to duplicate the content type resource, we create a virtual resource for read-only operations.

Methods

array
getConfigFor(string|ResourceInterface $resource)

Returns the configuration for a specific class.

array
getLinkConfigFor(string $linkType)

Returns the configuration for a specific link type.

Details

at line 183
array getConfigFor(string|ResourceInterface $resource)

Returns the configuration for a specific class.

Parameters

string|ResourceInterface $resource Either the FQCN of a resource, or an object implementing ResourceInterface

Return Value

array

Exceptions

InvalidArgumentException When passing an invalid or unrecognized resource

at line 222
array getLinkConfigFor(string $linkType)

Returns the configuration for a specific link type.

Parameters

string $linkType

Return Value

array

Exceptions

InvalidArgumentException When passing an unrecognized link type