A Promise which resolves when this Component has been successfully initialized.
Whether to preserve array keys when serializing collection data.
Set this to true
to allow serialization of a collection as a JSON object where array keys are
used to index the model objects. The default is to serialize all collections as array, regardless
of how the array is indexed.
The current request. If not set, Application.request will be used.
The current response. If not set, Application.response will be used.
Adds HTTP headers about the pagination to the response.
array the names of the requested fields. The first element is an array representing the list of default fields requested, while the second element is an array of the extra fields requested in addition to the default fields.
{@inheritdoc}
Serializes the given data into a format that can be easily turned into other formats. This method mainly converts the objects of recognized types into array representation. It will not do conversion for unknown object types or non-object data. The default implementation will handle Model, DataProvider and Arrays. You may override this method to support more object types.
the data to be serialized.
the converted data.
Serializes a data provider.
the DataProvider to be serialized.
the array representation of the DataProvider.
Serializes the validation errors in a model.
the array representation of the errors
Serializes a pagination into an array.
the array representation of the pagination
Generated using TypeDoc
Serializer converts resource objects and collections into array representation.
Serializer is mainly used by REST controllers to convert different objects into array representation so that they can be further turned into different formats, such as JSON, XML, by response formatters.
The default implementation handles resources as Model objects and collections as objects implementing [[DataProviderInterface]]. You may override [[serialize()]] to handle more types.
Mahesh S Warrier https://github.com/codespede