Back to index

plone3  3.1.7
Public Member Functions | Static Public Attributes | Static Private Attributes
CMFCore.URLTool.URLTool Class Reference
Inheritance diagram for CMFCore.URLTool.URLTool:
Inheritance graph
[legend]
Collaboration diagram for CMFCore.URLTool.URLTool:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __call__
def getPortalObject
def getRelativeContentPath
def getRelativeContentURL
def getPortalPath

Static Public Attributes

string id = 'portal_url'
string meta_type = 'CMF URL Tool'
tuple security = ClassSecurityInfo()
tuple manage_options
tuple manage_overview = DTMLFile('explainURLTool', _dtmldir)
 getRelativeUrl = getRelativeContentURL

Static Private Attributes

tuple __implements__ = (z2IURLTool, ActionProviderBase.__implements__)

Detailed Description

CMF URL Tool.

Definition at line 35 of file URLTool.py.


Member Function Documentation

def CMFCore.URLTool.URLTool.__call__ (   self,
  relative = 0,
  args,
  kw 
)
Get by default the absolute URL of the portal.

Definition at line 67 of file URLTool.py.

00067 
00068     def __call__(self, relative=0, *args, **kw):
00069         """ Get by default the absolute URL of the portal.
00070         """
00071         # XXX: this method violates the rules for tools/utilities:
00072         # absolute_url() depends implicitly on REQUEST
00073         return self.getPortalObject().absolute_url(relative=relative)

Here is the call graph for this function:

Here is the caller graph for this function:

Get the portal object itself.

Definition at line 75 of file URLTool.py.

00075 
00076     def getPortalObject(self):
00077         """ Get the portal object itself.
00078         """
00079         # XXX: this method violates the rules for tools/utilities:
00080         # queryUtility(ISiteRoot) doesn't work because we need the REQUEST
00081         return aq_parent( aq_inner(self) )

Here is the caller graph for this function:

Get the portal object's URL without the server URL component.

Definition at line 100 of file URLTool.py.

00100 
00101     def getPortalPath(self):
00102         """ Get the portal object's URL without the server URL component.
00103         """
00104         return '/'.join( self.getPortalObject().getPhysicalPath() )
00105 
00106 InitializeClass(URLTool)

Here is the call graph for this function:

def CMFCore.URLTool.URLTool.getRelativeContentPath (   self,
  content 
)
Get the path for an object, relative to the portal root.

Definition at line 83 of file URLTool.py.

00083 
00084     def getRelativeContentPath(self, content):
00085         """ Get the path for an object, relative to the portal root.
00086         """
00087         portal_path_length = len( self.getPortalObject().getPhysicalPath() )
00088         content_path = content.getPhysicalPath()
00089         return content_path[portal_path_length:]

Here is the call graph for this function:

Here is the caller graph for this function:

def CMFCore.URLTool.URLTool.getRelativeContentURL (   self,
  content 
)
Get the URL for an object, relative to the portal root.

Definition at line 91 of file URLTool.py.

00091 
00092     def getRelativeContentURL(self, content):
00093         """ Get the URL for an object, relative to the portal root.
00094         """
00095         return '/'.join( self.getRelativeContentPath(content) )

Here is the call graph for this function:


Member Data Documentation

tuple CMFCore.URLTool.URLTool.__implements__ = (z2IURLTool, ActionProviderBase.__implements__) [static, private]

Definition at line 41 of file URLTool.py.

Definition at line 97 of file URLTool.py.

string CMFCore.URLTool.URLTool.id = 'portal_url' [static]

Definition at line 43 of file URLTool.py.

Initial value:
( ActionProviderBase.manage_options
                     + ( {'label':'Overview',
                          'action':'manage_overview'}
                       ,
                       )
                     + SimpleItem.manage_options
                     )

Definition at line 49 of file URLTool.py.

tuple CMFCore.URLTool.URLTool.manage_overview = DTMLFile('explainURLTool', _dtmldir) [static]

Definition at line 61 of file URLTool.py.

string CMFCore.URLTool.URLTool.meta_type = 'CMF URL Tool' [static]

Definition at line 44 of file URLTool.py.

tuple CMFCore.URLTool.URLTool.security = ClassSecurityInfo() [static]

Definition at line 46 of file URLTool.py.


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