-
-
Notifications
You must be signed in to change notification settings - Fork 353
Entities (Specific)
Below is a breakdown of the significant, common, reusable entities that exist in Rock. They are listed below in logical groupings.
This is a hierarchical structured set of categories, and therefore they are best viewed using a tree view control (see Rock:CategoryPicker). Categories are tied to a particular EntityType so each EntityType can have it's own category tree. Several features in Rock use categories including Workflow, PrayerRequests, DataViews, and Reports.
You can think of DefinedTypes as a kind of dictionary of possible values for a particular thing. The particular thing is the 'defined type'. In Rock, developers can define types of reusable fields and their possible values using this generic entity (DefinedType
and DefinedValue
; stored in the respective tables of the same name). For example, there is a well-known DefinedType
called Record Type which has the following DefinedValues
: Person and Business. There is another type called Record Status which has these values: Active, Inactive, and Pending.
DefinedTypes are named, have a description, can have a category, can be ordered, and can also be further specified by a FieldType. DefinedValues are named, can have a description, and be ordered.
There are several reusable UI controls in the UI Toolkit that can be used to bind and display DefinedType's DefinedValues. See Databinding Rock Lists for details.
NOTE: By convention, any entity that has a property that ends with *
ValueId
is a reference to a DefinedValue.
Instead of having to create many miscellaneous entities and tables to hold these various dictionary-lookup values, developers can simply rely on DefinedTypes in the Rock framework to manage this data.
TODO
See Custom Field Attributes and FieldTypes.
TODO
Notes (and NoteType) are generic, reusable entities in Rock. You can create entries for your own custom NoteTypes which are related to your custom entities. For example, the Prayer system created a "Prayer Comment" type of note which is tied to the Rock.Model.PrayerRequest
entity. This is how people's comments are tied to prayer requests.
You are probably asking, 'I see how to related a Note to it's related entity (via the NoteType) but how does the actual note get related to the person who created it?' I have no idea.
David?