Back to index

plone3  3.1.7
Public Member Functions | Static Public Attributes | Static Private Attributes
CMFCore.SkinsContainer.SkinsContainer Class Reference

List of all members.

Public Member Functions

def getSkinPath
def getDefaultSkin
def getRequestVarname
def getSkinByPath
def getSkinByName

Static Public Attributes

tuple security = ClassSecurityInfo()

Static Private Attributes

 __implements__ = z2ISkinsContainer

Detailed Description

Definition at line 29 of file SkinsContainer.py.


Member Function Documentation

Get the default skin name.

Definition at line 43 of file SkinsContainer.py.

00043 
00044     def getDefaultSkin(self):
00045         """ Get the default skin name.
00046         """
00047         raise NotImplementedError

Here is the caller graph for this function:

Get the variable name to look for in the REQUEST.

Definition at line 49 of file SkinsContainer.py.

00049 
00050     def getRequestVarname(self):
00051         """ Get the variable name to look for in the REQUEST.
00052         """
00053         raise NotImplementedError

Get the named skin.

Definition at line 93 of file SkinsContainer.py.

00093 
00094     def getSkinByName(self, name):
00095         """ Get the named skin.
00096         """
00097         path = self.getSkinPath(name)
00098         if path is None:
00099             return None
00100         return self.getSkinByPath(path)
00101 
00102 InitializeClass( SkinsContainer )

Here is the call graph for this function:

def CMFCore.SkinsContainer.SkinsContainer.getSkinByPath (   self,
  path,
  raise_exc = 0 
)
Get a skin at the given path.

Definition at line 55 of file SkinsContainer.py.

00055 
00056     def getSkinByPath(self, path, raise_exc=0):
00057         """ Get a skin at the given path.
00058         """
00059         baseself = aq_base(self)
00060         skinob = None
00061         parts = list( path.split(',') )
00062         parts.reverse()
00063         for part_path in parts:
00064             partob = baseself
00065             for name in part_path.strip().split('/'):
00066                 if name == '':
00067                     continue
00068                 if name[:1] == '_':
00069                     # Not allowed.
00070                     partob = None
00071                     if raise_exc:
00072                         raise SkinPathError('Underscores are not allowed')
00073                     break
00074                 # Allow acquisition tricks.
00075                 partob = getattr(partob, name, None)
00076                 if partob is None:
00077                     # Not found.  Cancel the search.
00078                     if raise_exc:
00079                         raise SkinPathError('Name not found: %s' % part_path)
00080                     break
00081             if partob is not None:
00082                 # Now partob has containment and context.
00083                 # Build the final skinob by creating an object
00084                 # that puts the former skinob in the context
00085                 # of the new skinob.
00086                 partob = aq_base(partob)
00087                 if skinob is None:
00088                     skinob = partob
00089                 else:
00090                     skinob = partob.__of__(skinob)
00091         return skinob

Here is the call graph for this function:

Here is the caller graph for this function:

Convert a skin name to a skin path.

Definition at line 37 of file SkinsContainer.py.

00037 
00038     def getSkinPath(self, name):
00039         """ Convert a skin name to a skin path.
00040         """
00041         raise NotImplementedError

Here is the caller graph for this function:


Member Data Documentation

CMFCore.SkinsContainer.SkinsContainer.__implements__ = z2ISkinsContainer [static, private]

Definition at line 32 of file SkinsContainer.py.

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

Definition at line 34 of file SkinsContainer.py.


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