l.a.b.t.ObjectFormatterAPI : class documentation

Part of lp.app.browser.tales View In Hierarchy

Known subclasses: lp.app.browser.tales.BranchFormatterAPI, lp.app.browser.tales.BugTrackerFormatterAPI, lp.app.browser.tales.BugWatchFormatterAPI, lp.app.browser.tales.CustomizableFormatter, lp.app.browser.tales.IRCNicknameFormatterAPI, lp.app.browser.tales.LanguageFormatterAPI, lp.app.browser.tales.LinkFormatterAPI, lp.app.browser.tales.PackageBuildFormatterAPI, lp.app.browser.tales.PackageDiffFormatterAPI, lp.app.browser.tales.PersonFormatterAPI, lp.app.browser.tales.POFileFormatterAPI, lp.app.browser.tales.ProductReleaseFileFormatterAPI, lp.app.browser.tales.RevisionAuthorFormatterAPI, lp.app.browser.tales.SeriesSourcePackageBranchFormatter, lp.app.browser.tales.TranslationGroupFormatterAPI, lp.code.browser.diff.DiffFormatterAPI

Adapter for any object to a formatted string.
Method __init__ Undocumented
Method url Return the object's canonical URL.
Method api_url Return the object's (partial) canonical web service URL.
Method traverse Traverse the specified path, processing any optional parameters.
Method link Return an HTML link to the object's page.
Method global_css Undocumented
Method pagetitle The page title to be used.
Method _getSaneBreadcrumbDetail Undocumented
def __init__(self, context):
Undocumented
def url(self, view_name=None, rootsite=None):
Return the object's canonical URL.
Parametersview_nameIf not None, return the URL to the page with that name on this object.
rootsiteIf not None, return the URL to the page on the specified rootsite. Note this is available only for subclasses that allow specifying the rootsite.
def api_url(self, context):
Return the object's (partial) canonical web service URL.

This method returns everything that goes after the web service version number. Effectively the canonical URL but only the relative part with no site.

def traverse(self, name, furtherPath):
Traverse the specified path, processing any optional parameters.

Up to 2 parameters are currently supported, and the path name will be
of the form:
    name:param1:param2
where
    param1 = rootsite (only used for link and url paths).
    param2 = default (used when self.context is None). The context
             is not None here so this parameter is ignored.
def link(self, view_name, rootsite=None):
Return an HTML link to the object's page.

The link consists of an icon followed by the object's name.

Parametersview_nameIf not None, the link will point to the page with that name on this object.
rootsiteIf not None, return the URL to the page on the specified rootsite. Note this is available only for subclasses that allow specifying the rootsite.
def global_css(self):
Undocumented
def _getSaneBreadcrumbDetail(self, breadcrumb):
Undocumented
def pagetitle(self):
The page title to be used.

By default, reverse breadcrumbs are always used if they are available. If not available, then the view's .page_title attribute is used.

API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.