The euphorie.content.behaviour package implements variours behaviours of content in the site. Some of these are implemented using plone.behavior and configured using the FTI, others are implemented using more traditional patterns.
Several content types in euphorie use a rich text description. This requires a little bit of special interaction for Plone, which is implemented in this behaviour.
Enabling this behaviour for a content type does two things: it replaces the standard description field with a rich text version, and registers a catalog indexer which returns a plain text version of the description.
Within a survey every element must have a unique identification number. This is managed through two behaviours: a content type with the IIdGenerationRoot behaviour acts as a id numbering boundary. All items underneath this root will have a unique number. The INameFromUniqueId behaviour indicates that a type’s instances should get unique numbers.
Marker interface for objects which act as the root for ids.
Generated ids do not always need to be globally unique. Objects with this marked interface (or dexterity behaviour) act as uniqueness root.
Marker interface for objects which should get a unique id.
Objects with this interface automatically get a unique id when they are added to an container (as long as INameChooser is used). Ids are unique within the context of IIdGenerationRoot.
INameChooser for INameFromUniqueId objects.
This implementation uses a simple increasing numerical id, starting with 1.
It can be useful to know if a content tree has any unpublished changes. This behaviour manages that by tracking creation, deletion, moving and modification of content objects and updating a dirty flag on the first parent object which provides the IDirtyTreeRoot marker interface. The flag is reset on succesfull workflow transitions.
Marker interface for objects which act as the root of a dirty tree.
Explicitly clear the ditry flag on an object.
Check if an object is dirty, ie it has modified children.