Package: visaplan.plone.infohubs
visaplan.plone.infohubsThis product establishes a “mini language” for the calculation and re-use of
information inPloneinstances during the processing of a single request,
e.g. when creating breadcrumbs; e.g., if the login state is important for the
breadcrumb for/foo, that same state might be important for the/foo/barbreadcrumb as well.It is part of the footing of the “Unitracc family” of Plone sites
which are maintained byvisaplan GmbH, Bochum, Germany; the mini-language
was established during the development of the now factored-out packagevisaplan.plone.breadcrumbs.The purpose of this package (for now) isnotto provide new functionality
but to factor out existing functionality from our former monolithic Zope product.
Thus, it is more likely to lose functionality during further development
(as parts of it will be forked out into their own packages,
or some functionality may even become obsolete because there are better
alternatives in standard Plone components).FeaturesTheinfodictionary holds the collected information of interest
during processing of the request.Thehubdictionary holds the tools which were used to get those
information chunks.For some named tools, there are abbreviations available (e.g.pcforportal_catalog), mostly for historical reasons.ExamplesThis add-on can be seen in action at the following sites:https://www.unitracc.dehttps://www.unitracc.comInstallation and usageAddvisaplan.plone.infohubsto the requirements of your add-on.Then, in your own code:from visaplan.plone.infohubs import make_hubs
...
    # in some function or method where you have a meaningful context:
    hub, info = make_hubs(self.context)
    someval = info['some_known_key']While getting the information for the given keysome_known_key,
the used tools will be stored in thehubdictionary,
and other information found on the way will be stored in theinfodictionary.ContributeIssue Tracker:https://github.com/visaplan/plone.infohubs/issuesSource Code:https://github.com/visaplan/plone.infohubsSupportIf you are having issues, please let us know;
please use theissue trackermentioned above.LicenseThe project is licensed under the GPLv2.ContributorsTobias Herp,tobias.herp@visaplan.comChangelog1.2.0 (2020-12-16)New Features:@@infohubs-demoview to allow interactive tests;
info keys and their values are listed in resolution order.Withvisaplan.tools>= v1.3.1, thekeysinput field will take
multiple keys to demonstrate.info keymy_translation: a proxy to get the appropriate language version
for an object given bypathoruidImprovements:Ifvisaplan.zope.reldbis installed, thehub['sqlwrapper']will use its wrapper for anSQLAlchemy-based database connectionHard dependencies removed:PackageDepending featuresvisaplan.plone.groupsinfo['group_title']info['gid'](group id)info['managed_group_title']info['is_member_of'](`group`)visaplan.plone.toolsinfo['session']info['gid'](group id)visaplan.plone.pdfexportinfo['PDFCreator']visaplan.zope.reldborvisaplan.plone.sqlwrapperhub['sqlwrapper']visaplan.plone.unitracctoolinfo['desktop_brain']info['desktop_url']info['bracket_default']Requirements:Ifvisaplan.zope.reldbis not installed
butvisaplan.plone.sqlwrapperis, the latter must be >= v1.0.3.Ifvisaplan.zope.reldbisinstalled, we don’t care whether or notvisaplan.plone.sqlwrapperis installed as well, and which version.[tobiasherp]1.1.0 (2020-07-15)New Features:info keymy_translation: a proxy to get the appropriate language version
for an object given bypathoruid[tobiasherp]1.0.2 (2019-05-09)convenience functioncontext_tuple,
e.g. for methods with optionalhubandinfoargumentsExplicitly raise TypeErrors instead of using assertions
(context_and_form_tuple,context_tuple)New info keyscounterandcounters[tobiasherp]1.0.1 (2019-01-31)info['my_uid']usesplone.uuid.interfaces.IUUIDdirectly
[tobiasherp]1.0 (2018-09-17)Initial release.
[tobiasherp]