class CreatePostController extends AbstractCreateController
Properties
$serializer | {@inheritdoc} |
|
||
$include | {@inheritdoc} |
|
||
array | $optionalInclude | The relationships that are available to be included. | from AbstractSerializeController |
|
int | $maxLimit | The maximum number of records that can be requested. | from AbstractSerializeController |
|
int | $limit | The number of records included by default. | from AbstractSerializeController |
|
array | $sortFields | The fields that are available to be sorted by. | from AbstractSerializeController |
|
array|null | $sort | The default sort field and order to user. | from AbstractSerializeController |
|
static protected Container | $container | from AbstractSerializeController |
|
|
static protected array | $beforeDataCallbacks | from AbstractSerializeController |
|
|
static protected array | $beforeSerializationCallbacks | from AbstractSerializeController |
|
|
static protected array | $loadRelations | from AbstractSerializeController |
|
|
protected Dispatcher | $bus |
|
Methods
{@inheritdoc}
Get the data to be serialized and assigned to the response document.
Create a PHP JSON-API Element for output in the document.
Eager loads the required relationships.
No description
No description
No description
No description
No description
Set the serializer that will serialize data for the endpoint.
Include the given relationship by default.
Don't include the given relationship by default.
Make the given relationship available for inclusion.
Don't allow the given relationship to be included.
Allow sorting results by the given field.
Disallow sorting results by the given field.
No description
No description
No description
Details
ResponseInterface
handle(ServerRequestInterface $request)
{@inheritdoc}
at
line 54
protected mixed
data(ServerRequestInterface $request, Document $document)
Get the data to be serialized and assigned to the response document.
protected ElementInterface
createElement(mixed $data, SerializerInterface $serializer)
Create a PHP JSON-API Element for output in the document.
protected void
loadRelations(Collection $models, array $relations)
Eager loads the required relationships.
protected array
extractInclude(ServerRequestInterface $request)
protected array
extractFields(ServerRequestInterface $request)
protected array|null
extractSort(ServerRequestInterface $request)
protected int
extractOffset(ServerRequestInterface $request)
protected int
extractLimit(ServerRequestInterface $request)
protected array
extractFilter(ServerRequestInterface $request)
protected Parameters
buildParameters(ServerRequestInterface $request)
setSerializer(string $serializer)
Set the serializer that will serialize data for the endpoint.
addInclude(string|array $name)
Include the given relationship by default.
removeInclude(string|array $name)
Don't include the given relationship by default.
addOptionalInclude(string|array $name)
Make the given relationship available for inclusion.
removeOptionalInclude(string|array $name)
Don't allow the given relationship to be included.
setLimit(int $limit)
Set the default number of results.
setMaxLimit(int $max)
Set the maximum number of results.
addSortField(string|array $field)
Allow sorting results by the given field.
removeSortField(string|array $field)
Disallow sorting results by the given field.
setSort(array $sort)
Set the default sort order for the results.