[silva.core.interfaces][Sylvain Viollon] Extend interface.
[email protected] Wed, 28 Aug 2013 12:00:03 +0200
| Newsgroups | gmane.comp.web.zope.silva.cvs |
|---|---|
| Message-ID | <[email protected]> |
author: Sylvain Viollon
date: Wed Aug 28 11:59:59 2013 +0200
revision: 245:fef6da91acc4 in silva.core.interfaces
branch: 2.4
details: https://hg.infrae.com/silva.core.interfaces?cmd=changeset;node=fef6da91acc4
modified: src/silva/core/interfaces/adapters.py
added:
removed:
log: Extend interface.
diffstat:
src/silva/core/interfaces/adapters.py | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diffs (30 lines):
diff -r 0b4acff173e6 -r fef6da91acc4 src/silva/core/interfaces/adapters.py
--- a/src/silva/core/interfaces/adapters.py Tue Aug 27 18:22:07 2013 +0200
+++ b/src/silva/core/interfaces/adapters.py Wed Aug 28 11:59:59 2013 +0200
@@ -481,18 +481,22 @@
content or identifier.
"""
- def get_identifier(identifier):
+ def get_identifier(identifier, default):
"""Return the icon associated to the given meta_type
- identifier.
+ identifier. If the icon is not found, an icon matching default
+ can be lookup for (not required). If it is not found, ``None``
+ is returned.
"""
def get_content(content):
"""Return the icon associated to the given Zope content.
"""
- def get_identifier_url(identifier):
+ def get_identifier_url(identifier, default):
"""Return the full icon URL associated to the given
- meta_type_identifier.
+ meta_type_identifier. If the icon is not found, the URL of an
+ icon matching default can be looked up for (not required). If
+ it is not found, ``None`` is returned.
"""
def get_content_url(content):