Colymba\RESTfulAPI\Serializers\DefaultSerializer::getEmbedData
Returns a DataObject relation's data formatted and ready to embed.
Signature
protected function getEmbedData(DataObject
$record,
string
$relationName )
Parameters
$record
—
SilverStripe\ORM\DataObject
- The DataObject to get the data from
$relationName
—
string
- The name of the relation
Returns
- array|null
- Formatted DataObject or RelationList ready to embed or null if nothing to embed