src/pyams_content/component/paragraph/__init__.py
changeset 355 5dce53509832
parent 241 50452584f7ae
child 407 0ef5de2d5674
--- a/src/pyams_content/component/paragraph/__init__.py	Tue Feb 06 11:15:55 2018 +0100
+++ b/src/pyams_content/component/paragraph/__init__.py	Tue Feb 06 11:16:23 2018 +0100
@@ -47,7 +47,12 @@
 
 @subscriber(IObjectAddedEvent, context_selector=IParagraphContainerTarget)
 def handle_new_paragraphs_container(event):
-    """Handle new paragraphs container"""
+    """Handle new paragraphs container
+
+    Subscriber to IObjectAddedEvent for objects implementing IParagraphContainerTarget: when a
+    new paragraphs container is created (in version 1), automatically create new paragraphs matching
+
+    """
     container = IParagraphContainer(event.object)
     if len(container) > 0:
         return
@@ -78,6 +83,15 @@
     title = FieldProperty(IBaseParagraph['title'])
 
 
+@implementer(IParagraphFactory)
+class BaseParagraphFactory(object):
+    """Base paragraph factory class"""
+
+    name = None
+    content_type = None
+    custom_menu = False
+
+
 class BaseParagraphContentChecker(BaseContentChecker):
     """Base paragraph content checker mixin"""