当前位置: 首页>>代码示例>>Python>>正文


Python BaseObject._notifyOfCopyTo方法代码示例

本文整理汇总了Python中Products.Archetypes.BaseObject.BaseObject._notifyOfCopyTo方法的典型用法代码示例。如果您正苦于以下问题:Python BaseObject._notifyOfCopyTo方法的具体用法?Python BaseObject._notifyOfCopyTo怎么用?Python BaseObject._notifyOfCopyTo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Products.Archetypes.BaseObject.BaseObject的用法示例。


在下文中一共展示了BaseObject._notifyOfCopyTo方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _notifyOfCopyTo

# 需要导入模块: from Products.Archetypes.BaseObject import BaseObject [as 别名]
# 或者: from Products.Archetypes.BaseObject.BaseObject import _notifyOfCopyTo [as 别名]
    def _notifyOfCopyTo(self, container, op=0):
        """In the case of a move (op=1) we need to make sure
        references are mainained for all referencable objects within
        the one being moved.

        manage_renameObject calls _notifyOfCopyTo so that the
        object being renamed doesn't lose its references. But
        manage_renameObject calls _delObject which calls
        manage_beforeDelete on all the children of the object
        being renamed which deletes all references for children
        of the object being renamed. Here is a patch that does
        recursive calls for _notifyOfCopyTo to address that
        problem.
        """
        # XXX this doesn't appear to be necessary anymore, if it is
        # it needs to be used in BaseBTreeFolder as well, it currently
        # is not.
        BaseObject._notifyOfCopyTo(self, container, op=op)
        # keep reference info internally when op == 1 (move)
        # because in those cases we need to keep refs
        if op==1:
            self._v_cp_refs = 1
        for child in self.contentValues():
            if IReferenceable.providedBy(child):
                child._notifyOfCopyTo(self, op)
开发者ID:dtgit,项目名称:dtedu,代码行数:27,代码来源:BaseFolder.py

示例2: _notifyOfCopyTo

# 需要导入模块: from Products.Archetypes.BaseObject import BaseObject [as 别名]
# 或者: from Products.Archetypes.BaseObject.BaseObject import _notifyOfCopyTo [as 别名]
 def _notifyOfCopyTo(self, container, op=0):
     # OFS.CopySupport notify
     BaseObject._notifyOfCopyTo(self, container, op=op)
     # keep reference info internally when op == 1 (move)
     # because in those cases we need to keep refs
     if op == 1:
         self._v_cp_refs = 1
开发者ID:CGTIC,项目名称:Plone_SP,代码行数:9,代码来源:BaseContent.py


注:本文中的Products.Archetypes.BaseObject.BaseObject._notifyOfCopyTo方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。