class MultipleModelTransformer implements DataTransformerInterface

Methods

__construct(string $type)

No description

int[]
transform(Model|Model[]|null $models)

Transforms objects (models) to integers (IDs)

Model[]
reverseTransform(int|int[] $ids)

Transforms IDs to a list of objects

Details

at line line 20
__construct(string $type)

Parameters

string $type The type of the model (e.g Team)

at line line 31
int[] transform(Model|Model[]|null $models)

Transforms objects (models) to integers (IDs)

Parameters

Model|Model[]|null $models The models to transform

Return Value

int[]

at line line 47
Model[] reverseTransform(int|int[] $ids)

Transforms IDs to a list of objects

Parameters

int|int[] $ids The model IDs to transform

Return Value

Model[]

Exceptions

TransformationFailedException if the team is not found.