Did I find the right examples for you? yes no

All Samples(39)  |  Call(39)  |  Derive(0)  |  Import(0)
Test whether an interface is implemented by the specification

src/p/r/Products.Silva-3.0.4/Products/Silva/Folder/tree.py   Products.Silva(Download)
                # default document should not be inserted
                continue
            if (IContainer.providedBy(item) and
                item.is_transparent()):
                l.append((indent, item))
    def _get_container_tree_helper(self, l, indent, depth):
        for item in self.context.get_ordered_publishables():
            if not IContainer.providedBy(item):
                continue
            if item.is_transparent():
                continue
            l.append((indent, item))
            if (IContainer.providedBy(item) and
                (item.is_transparent() or include_publications)):
                if depth == -1 or indent < depth:
        for item in self.context.get_ordered_publishables():
            l.append((indent, item))
            if not IContainer.providedBy(item):
                continue
            if (depth == -1 or indent < depth) and item.is_transparent():

src/p/r/Products.Silva-3.0.4/Products/Silva/GhostFolder/content.py   Products.Silva(Download)
                errors.append(error)
 
            if IContainer.providedBy(h_ob) and g_ob is not None:
                stack.extend(self._haunt_diff(h_ob, g_ob))
 
                haunted and ghost are the objects passed in
        """
        assert IContainer.providedBy(haunted)
        assert IContainer.providedBy(ghost)
        h_ids = list(haunted.objectIds())
    def is_transparent(self):
        """show in subtree? depends on haunted object"""
        content = self.get_haunted()
        if IContainer.providedBy(content):
            return content.is_transparent()
    def need_update(self):
        if IGhostFolder.providedBy(self.manager.ghost):
            return self.target != self.manager.ghost.get_haunted()
        # Only update if the invalid ghost is an asset.
        return IContainer.providedBy(self.manager.ghost)

src/s/i/silva.export.html-3.0/src/silva/export/html/url.py   silva.export.html(Download)
    def __init__(self, root, extension='html'):
        if not IContainer.providedBy(root):
            root = aq_parent(root)
        self._origin = root.getPhysicalPath()
        self.extension = extension
 
    def __call__(self, content):
        if IContainer.providedBy(content):

src/p/r/Products.Silva-3.0.4/Products/Silva/AutoTOC/rendering.py   Products.Silva(Download)
    def update(self):
        if self.toc_container is None:
            self.toc_container = self.context.get_container()
        assert IContainer.providedBy(self.toc_container)
        if self.toc_content_types is None:
            yield (level, item)
 
            if IContainer.providedBy(item) and can_recurse:
                for data in self.list_toc_items(item, level + 1, is_displayable):
                    yield data

src/p/r/Products.SilvaExternalSources-3.0.3/Products/SilvaExternalSources/CodeSourceService.py   Products.SilvaExternalSources(Download)
def register_source(source, event):
    """Register newly created source to the service.
    """
    if (event.object is source and
            not IContainer.providedBy(event.newParent)):
    if (event.object is source and
        event.newName is not None and
            IContainer.providedBy(event.newParent)):
        # We are just moving or renaming the source
        return

src/s/i/silva.core.references-3.0.4/src/silva/core/references/widgets/rest.py   silva.core.references(Download)
            'icon': self.get_icon(content),
            'implements': require and require.providedBy(content) or False,
            'folderish': interfaces.IContainer.providedBy(content),
            'title': content.get_title_or_id_editable(),
            'short_title': content.get_short_title_editable()}
            for content in provider():
                if (require.providedBy(content) or
                    interfaces.IContainer.providedBy(content)):
                    details.append(self.get_item_details(content, require=require))
        return details

src/p/r/Products.Silva-3.0.4/Products/Silva/File/service.py   Products.Silva(Download)
        new_file = self.service.new_file(identifier)
        container = content.aq_parent
        if not interfaces.IContainer.providedBy(container):
            # Self-autodestruct file.
            container._delObject(identifier)

src/p/r/Products.Silva-3.0.4/Products/Silva/adapters/archivefileimport.py   Products.Silva(Download)
        while id in context.objectIds():
            obj = context[id]
            if interfaces.IContainer.providedBy(obj):
                return obj
            id = str(idObj.new())

src/p/r/Products.Silva-3.0.4/Products/Silva/tocfilter.py   Products.Silva(Download)
    def __call__(self, content):
        if IContainer.providedBy(content):
            default = content.get_default()
            if default is None:
                return True

src/p/r/Products.Silva-3.0.4/Products/Silva/helpers.py   Products.Silva(Download)
        if object.is_published():
            object.close_version()
    if interfaces.IContainer.providedBy(object):
        default = object.get_default()
        if default:

  1 | 2 | 3  Next