tom-alexander / silverstripe-api
API controller and model serialization for silverstripe
dev-master
2015-08-25 11:19 UTC
Requires
- php: >=5.3.0
- league/fractal: ^0.12.0
This package is not auto-updated.
Last update: 2024-10-26 18:17:27 UTC
README
Usage
Use SerializableExtension
to provide a model with the required serialization API.
FooPage:
extensions:
- SerializableExtension
FooPage extends Page
{
}
FooPage_Controller extends ApiController
{
}
You can specify the transformer or serializer for a particular model using the config:
FooPage:
transformer: MyCustomTransformer
serializer: MyCustomSerializer
Access control
Access control is implemented through the Member system