utilities/resource
Utility to render a resource
Parameters
Parameter |
Type |
Attributes |
Description |
---|---|---|---|
original |
Object |
Required |
Resource template |
options.id |
String |
Required |
Unique ID to assign to resource. |
options.parentid |
Number |
Optional |
Parent record id. |
options.where |
Object |
Optional |
Filters to apply to article fetch. |
options.upload |
String |
Required |
Upload path. |
options.download |
String |
Required |
Download path. |
options.imagesize |
Number |
Required |
Maximum image size. |
options.icon |
Boolean |
Optional |
— |
options.label |
String |
Optional |
— |
options.parent |
String |
Optional |
ID of the parent resource to add this resource as a sub menu option of. |
options.article |
Boolean |
Optional |
Return the Article model constructor. |
options.article.extend |
Boolean |
Optional |
— |
options.article.parent |
Boolean |
Optional |
— |
options.articleonly |
Boolean |
Optional |
Return the Article model constructor. |
options.element |
String |
Optional |
Element definitions. |
options.elementonly |
String |
Optional |
Return the element definition. |
options.form |
true, Number, Object |
Optional |
Loads a form for the Article model and extends the resource element property and article map with fields loaded from the form. Refer to Record.form for valid parameters. |
options.hidden |
Boolean |
Optional |
The resource is hidden. |
options.search |
Boolean |
Optional |
— |
options.remote |
Boolean |
Optional |
— |
options.readonly |
Boolean |
Optional |
— |
options.min |
Boolean |
Optional |
— |
options.max |
Boolean |
Optional |
— |
options.enable |
Boolean |
Optional |
— |
options.disable |
Boolean |
Optional |
— |
options.* |
Object |
Optional |
All other option values are added to the templating scope under options. |