當前位置: 首頁>>代碼示例>>Python>>正文


Python ISelectableBrowserDefault.providedBy方法代碼示例

本文整理匯總了Python中Products.CMFDynamicViewFTI.interfaces.ISelectableBrowserDefault.providedBy方法的典型用法代碼示例。如果您正苦於以下問題:Python ISelectableBrowserDefault.providedBy方法的具體用法?Python ISelectableBrowserDefault.providedBy怎麽用?Python ISelectableBrowserDefault.providedBy使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Products.CMFDynamicViewFTI.interfaces.ISelectableBrowserDefault的用法示例。


在下文中一共展示了ISelectableBrowserDefault.providedBy方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: test_isMixedIn

# 需要導入模塊: from Products.CMFDynamicViewFTI.interfaces import ISelectableBrowserDefault [as 別名]
# 或者: from Products.CMFDynamicViewFTI.interfaces.ISelectableBrowserDefault import providedBy [as 別名]
 def test_isMixedIn(self):
     self.assertTrue(isinstance(self.af, BrowserDefaultMixin),
                     "ISelectableBrowserDefault was not mixed in to ATFolder")
     self.assertTrue(ZopeTwoISelectableBrowserDefault.providedBy(self.af),
                     "ISelectableBrowserDefault not implemented by ATFolder instance")
     self.assertTrue(ISelectableBrowserDefault.providedBy(self.af),
                     "ISelectableBrowserDefault not implemented by ATFolder instance")
開發者ID:CGTIC,項目名稱:Plone_SP,代碼行數:9,代碼來源:test_browserdefaultmixin.py

示例2: get_target_object_layout

# 需要導入模塊: from Products.CMFDynamicViewFTI.interfaces import ISelectableBrowserDefault [as 別名]
# 或者: from Products.CMFDynamicViewFTI.interfaces.ISelectableBrowserDefault import providedBy [as 別名]
 def get_target_object_layout(self, target):
     """
     Returns target object 'view' action page template
     """
     if ISelectableBrowserDefault.providedBy(target):
         return target.getLayout()
     else:
         return 'base_view'
開發者ID:collective,項目名稱:collective.newsletter,代碼行數:10,代碼來源:newsletter.py

示例3: rename_default_page

# 需要導入模塊: from Products.CMFDynamicViewFTI.interfaces import ISelectableBrowserDefault [as 別名]
# 或者: from Products.CMFDynamicViewFTI.interfaces.ISelectableBrowserDefault import providedBy [as 別名]
def rename_default_page(obj, event):
    newParent = event.newParent
    if newParent != event.oldParent:
        return
    elif ISelectableBrowserDefault.providedBy(newParent):
        default_page_id = newParent.getProperty('default_page', '')
        if default_page_id == event.oldName:
            ISelectableBrowserDefault(newParent).setDefaultPage(event.newName)
開發者ID:urska19,項目名稱:Plone-test,代碼行數:10,代碼來源:browserdefault.py

示例4: rename_default_page

# 需要導入模塊: from Products.CMFDynamicViewFTI.interfaces import ISelectableBrowserDefault [as 別名]
# 或者: from Products.CMFDynamicViewFTI.interfaces.ISelectableBrowserDefault import providedBy [as 別名]
def rename_default_page(obj, event):
    """event subscriber, rename default page if targte was renamed

    used by default for zope.lifecycleevent.interfaces.IObjectMovedEvent
    """
    newParent = event.newParent
    if newParent != event.oldParent:
        return
    elif ISelectableBrowserDefault.providedBy(newParent):
        default_page_id = newParent.getProperty("default_page", "")
        if default_page_id == event.oldName:
            ISelectableBrowserDefault(newParent).setDefaultPage(event.newName)
開發者ID:pigaov10,項目名稱:plone4.3,代碼行數:14,代碼來源:browserdefault.py

示例5: getTargetObjectLayout

# 需要導入模塊: from Products.CMFDynamicViewFTI.interfaces import ISelectableBrowserDefault [as 別名]
# 或者: from Products.CMFDynamicViewFTI.interfaces.ISelectableBrowserDefault import providedBy [as 別名]
 def getTargetObjectLayout(self, target):
     """
     Returns target object 'view' action page template
     """
     
     if HAS_ISBD and ISelectableBrowserDefault.providedBy(target):
         return target.getLayout()
     else:
         view = target.getTypeInfo().getActionById('view') or 'base_view'
         
         # If view action is view, try to guess correct template
         if view == 'view':
             view = target.portal_type.lower() + '_view'
             
         return view
開發者ID:BenoitTalbot,項目名稱:bungeni-portal,代碼行數:17,代碼來源:TabbedSubpages.py


注:本文中的Products.CMFDynamicViewFTI.interfaces.ISelectableBrowserDefault.providedBy方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。