Skip to content

Commit

Permalink
Move IVocabularyFactory to zope.schema.interfaces.
Browse files Browse the repository at this point in the history
Note that this doesn't require BBB. IVocabularyFactory's location at
zope.app.schema.interfaces was introduced only a month back, therefore
never released.
  • Loading branch information
philikon committed Apr 7, 2006
0 parents commit 12637b8
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions __init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
##############################################################################
#
# Copyright (c) 2002 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""Content Type convenience lookup functions
$Id$
"""
__docformat__ = 'restructuredtext'
from zope.interface import classProvides
from zope.schema.interfaces import IVocabularyFactory
from zope.app.interface import queryType
from zope.app.content.interfaces import IContentType
from zope.app.component.vocabulary import UtilityVocabulary

def queryContentType(object):
"""Returns the interface implemented by object which implements
`IContentType`."""
return queryType(object, IContentType)

class ContentTypesVocabulary(UtilityVocabulary):
classProvides(IVocabularyFactory)
interface = IContentType

0 comments on commit 12637b8

Please sign in to comment.