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

getConfigFor(string|ResourceInterface $resource)

Returns the configuration for a specific class.

getLinkConfigFor(string $linkType)

Returns the configuration for a specific link type.

Details

at line 182
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

Exceptions

InvalidArgumentException When passing an invalid or unrecognized resource

at line 207
getLinkConfigFor(string $linkType)

Returns the configuration for a specific link type.

Parameters

string $linkType

Exceptions

InvalidArgumentException When passing an unrecognized link type