new Poly(name, type, schema, value, $endpoint, service, $states, relationName)
Apy Poly(morph) Field
It converts itself to any known types
Parameters:
| Name | Type | Description |
|---|---|---|
name |
string | Field name |
type |
string | Field type |
schema |
Object | Field schema |
value |
Object | Field value |
$endpoint |
string | Field endpoint |
service |
Object | Reference to Service instance |
$states |
Object | Field inner state holder instance |
relationName |
string | (optional) Field relation name |
Extends
Methods
-
<static> setType(type, schemaName)
-
Type setter.
Allow the Polymorph field to
morphsto another type.Parameters:
Name Type Description typestring Field type
schemaNamestring Backend Resource schema name
-
<static> validate()
-
Override parent property to disabled validation. Polymorph field cannot be validated as no schema is provided. No choice but to tell the user to use this to its own risks.