Back to index

plone3  3.1.7
Public Member Functions Class Reference
Inheritance diagram for
Inheritance graph
Collaboration diagram for
Collaboration graph

List of all members.

Public Member Functions

def __call__
def nextURL
def create

Detailed Description

An add view that will add its content immediately, without presenting
a form.

You should subclass this for portlets that do not require any configuration
before being added, and write a create() method that takes no parameters
and returns the appropriate assignment instance.

Definition at line 81 of file

Member Function Documentation

Definition at line 90 of file

00091     def __call__(self):
00092         IPortletPermissionChecker(aq_parent(aq_inner(self.context)))()
00093         ob = self.create()
00094         zope.event.notify(zope.lifecycleevent.ObjectCreatedEvent(ob))
00095         self.context.add(ob)
00096         nextURL = self.nextURL()
00097         if nextURL:
00098             self.request.response.redirect(self.nextURL())
00099         return ''

Here is the call graph for this function:

Here is the caller graph for this function:

Reimplemented in,,, and

Definition at line 110 of file

00111     def create(self):
00112         raise NotImplementedError("concrete classes must implement create()")

Here is the caller graph for this function:

Definition at line 100 of file

00101     def nextURL(self):
00102         referer = self.request.get('referer')
00103         if referer:
00104             return referer
00105         else:
00106             addview = aq_parent(aq_inner(self.context))
00107             context = aq_parent(aq_inner(addview))
00108             url = str(getMultiAdapter((context, self.request), name=u"absolute_url"))
00109             return url + '/@@manage-portlets'

Here is the call graph for this function:

Here is the caller graph for this function:

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