Constructor
# new PropertyDecorator(opts)
Parameters:
Name | Type | Description |
---|---|---|
opts |
Object | |
property |
BaseProperty | |
admin |
AdminBro | current instance of AdminBro |
options |
PropertyOptions | |
resource |
ResourceDecorator |
Members
Methods
# availableValues() → {Array.<{value: string, label: string}>}
If given property has limited number of available values it returns them.
Array.<{value: string, label: string}>
# isTitle() → {boolean}
If property should be treated as an title field Title field is used as a link to the resource page in the list view and in the breadcrumbs
boolean
# isVisible(element)
Indicates if given property should be visible
Parameters:
Name | Type | Description |
---|---|---|
element |
boolean | it could be either "list", "edit" or "show" |
# reference() → {BaseResource}
When given property is a reference to another Resource - it returns this Resource
reference resource
# subProperties() → {Array.<PropertyDecorator>}
Decorates subProperties
decorated subProperties
Array.<PropertyDecorator>
# toJSON() → {PropertyJSON}
Returns JSON representation of a property