Register Custom Mura ORM Entity
This is an example of how to register a custom Mura ORM entity:
<cfscript>
var APIUtility = getBean('settingsManager').getSite({siteid}).getAPI('json', 'v1');
APIUtility.registerEntity(entityName='myCustomEntity', config={});
</cfscript>
Mura ORM Entity Config Options
| Argument | Type | Description |
|---|---|---|
| fields | string | A comma-separated list of fields that you would like to return as a default for the JSON objects. |
| allowfieldselect | boolean | If false, Mura will not allow custom field selects. |
| moduleid | string | The Mura CMS module or plugin that permissions for this entity should be tied to. |
| public | boolean | If false, will apply permissions based on the config. |
Example Mura ORM Entity Config
<cfscript>
myConfig = {
fields = 'domain,siteid',
allowfieldselect = false
};
var APIUtility = getBean('settingsManager').getSite({siteid}).getAPI('json', 'v1');
APIUtility.registerEntity(entityName='myCustomEntity', config=myConfig);
</cfscript>
History
Feature added in version 6.2.