Back to index

plone3  3.1.7
Classes | Functions
CMFDefault.DiscussionItem Namespace Reference

Classes

class  DiscussionItem
class  DiscussionItemContainer

Functions

def addDiscussionItem

Function Documentation

def CMFDefault.DiscussionItem.addDiscussionItem (   self,
  id,
  title,
  description,
  text_format,
  text,
  reply_to,
  RESPONSE = None 
)
Add a discussion item

'title' is also used as the subject header
if 'description' is blank, it is filled with the contents of 'title'
'reply_to' is the object (or path to the object) which this is a reply to

Otherwise, same as addDocument

Definition at line 46 of file DiscussionItem.py.

00046 
00047                       reply_to, RESPONSE=None):
00048     """ Add a discussion item
00049 
00050     'title' is also used as the subject header
00051     if 'description' is blank, it is filled with the contents of 'title'
00052     'reply_to' is the object (or path to the object) which this is a reply to
00053 
00054     Otherwise, same as addDocument
00055     """
00056 
00057     if not description: description = title
00058     text = scrubHTML(text)
00059     item = DiscussionItem( id )
00060     item.title = title
00061     item.description = description
00062     item.text_format = text_format
00063     item.text = text
00064     item.setReplyTo(reply_to)
00065 
00066     item._parse()
00067     self._setObject(id, item)
00068 
00069     if RESPONSE is not None:
00070         RESPONSE.redirect(self.absolute_url())
00071 

Here is the call graph for this function: