Common Bean Objects
The following table contains information about Mura's most commonly used bean objects.
Bean | Load By | Description |
---|---|---|
configBean | n/a | Includes instance-wide configuration data, such as data collected in the settings.ini.cfm file. |
site | siteid | Includes site configuration data collected via the Site Settings section in the administration area, as well as other useful site-specific information. |
content | contentid, contenthistid, filename, remoteid, title, urltitle |
Includes data about a Mura content item, such as the title, summary, body, etc. In addition, there are several content-specific helper methods included. For example, you could get an iterator of any children of the content item, what specific categories the content item has been assigned to, etc. |
user | userid, username, remoteid |
Includes user-specific data, and includes a number of helper methods. For example, you can obtain an iterator of the groups the user belongs to, etc. |
group | groupid, groupname, remoteid |
Includes group-specific data, and includes a number of helper methods. For example, you can obtain an iterator of the users who belong to the group, etc. |
comment | commentid, remoteid |
Includes comment-specific data. In addition, there are some comment-specific helper methods included such as whether the comment is approved, deleted, etc. |
category | categoryid, name, remoteid, filename, urltitle |
Includes category-specific data. This bean contains information about a category itself, and does not describe any relationships to content items themselves. |
feed | feedid, name, remoteid |
Allows developers to programmatically query Mura for other beans/objects (such as content items, users, and/or custom objects), based on desired filters or search criteria. |
Inspecting Available Attributes
For each of the above beans/objects, using CFML's <cfdump> tag, you can easily inspect the available attributes and their values using the code examples below.
<!--- Loading a bean/object ---> <cfset someBean = m.getBean('{someBean}').loadBy({someAttribute}={someAttributeValue})> <!--- Assumes you have a properly loaded bean ---> <cfdump var="#someBean.getAllValues()#">