Back to index

plone3  3.1.7
Public Member Functions | Public Attributes | Private Member Functions
wicked.at.link.ATPortalFactoryAdd Class Reference
Inheritance diagram for wicked.at.link.ATPortalFactoryAdd:
Inheritance graph
[legend]
Collaboration diagram for wicked.at.link.ATPortalFactoryAdd:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def add_content
def notify_content_added
def context
def addMenu

Public Attributes

 request

Private Member Functions

def _create_content

Detailed Description

Definition at line 50 of file link.py.


Member Function Documentation

def wicked.at.link.ATPortalFactoryAdd._create_content (   self,
  title,
  type_name 
) [private]

Reimplemented from wicked.at.link.ATWickedAdd.

Definition at line 52 of file link.py.

00052 
00053     def _create_content(self, title, type_name):
00054         assert title, 'Must have a title to create content' 
00055         id_=self.context.generateUniqueId(type_name)
00056         
00057         new_content = self.context.restrictedTraverse('portal_factory/%s/%s' % (type_name, id_))
00058 
00059         transaction_note('Initiated creation of %s with id %s in %s' % \
00060                          (new_content.getTypeInfo().getId(),
00061                           id_,
00062                           self.context.absolute_url()))
00063         new_content.setTitle(title)
00064         newcontentid = normalize(title)
00065         new_content.setId(newcontentid)
00066         return new_content
00067 
00068 # channel on AT
@adapter(IBaseObject, IWickedContentAddedEvent)

Here is the call graph for this function:

def wicked.at.link.ATWickedAdd.add_content (   self,
  title = None,
  section = None,
  type_name = _marker 
) [inherited]

Reimplemented from wicked.link.WickedAdd.

Definition at line 30 of file link.py.

00030 
00031     def add_content(self, title=None, section=None, type_name=_marker):
00032         # make it possible to pass in container
00033         # pre-populate with backlinks?
00034         type_name = self.request.get('type_name', type_name)
00035         if type_name is _marker:
00036             type_name = self.context.portal_type
00037         title = self.request.get('Title', title)
00038         section = self.request.get('section', section)
00039         newcontent = self._create_content(title, type_name)
00040         self.notify_content_added(newcontent, title, section)

Here is the call graph for this function:

def wicked.link.WickedAdd.addMenu (   self) [inherited]

Definition at line 25 of file link.py.

00025 
00026     def addMenu(self):
00027         return 1
00028 
00029 
00030 _marker=object()

def wicked.link.WickedAdd.context (   self) [inherited]

Definition at line 19 of file link.py.

00019 
00020     def context(self):
00021         return self._context[0]

def wicked.link.WickedAdd.notify_content_added (   self,
  newcontent,
  title,
  section 
) [inherited]

Definition at line 15 of file link.py.

00015 
00016     def notify_content_added(self, newcontent, title, section):
00017         notify(WickedContentAddedEvent(self.context, newcontent, title, section, self.request))
        

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 13 of file link.py.


The documentation for this class was generated from the following file: