Did I find the right examples for you? yes no

All Samples(8)  |  Call(8)  |  Derive(0)  |  Import(0)

src/s/i/silva.core.contentlayout-3.0.5/src/silva/core/contentlayout/blocks/source.py   silva.core.contentlayout(Download)
        try:
            icon = icon_registry.get(
                ('silva.core.contentlayout.blocks', self.prefix))
        except ValueError:
            return None

src/s/i/silva.core.contentlayout-3.0.5/src/silva/core/contentlayout/blocks/manager.py   silva.core.contentlayout(Download)
    def get_icon(self, view):
        try:
            icon = icon_registry.get(
                ('silva.core.contentlayout.blocks', self.identifier))
        except ValueError:

src/p/r/Products.Silva-3.0.4/Products/Silva/tests/test_icon.py   Products.Silva(Download)
        self.assertTrue(verifyObject(IIconRegistry, registry))
 
        icon = registry.get(('meta_type', 'Silva Link'))
        self.assertTrue(verifyObject(IIcon, icon))
        self.assertEqual(
            str(icon),
            '++resource++icon-Silva-Link.png' )
 
        icon = registry.get(('meta_type', 'Silva Simple Member'))
            '++resource++icon-Silva-Simple-Member.png')
 
        icon = registry.get(('mime_type', 'application/pdf'))
        self.assertTrue(verifyObject(IIcon, icon))
        self.assertEqual(
            str(icon),
            '++static++/silva.icons/file_pdf.png')
 
        icon = registry.get(('mime_type', 'text/plain'))
 
        with self.assertRaises(ValueError):
            registry.get(('meta_type', 'Best content in the world'))
 
        marker = object()