Question

I'm looking for a way to fetch a ChannelManager ref from within a Component#doBeforeRender call, in a somewhat similar way to the QueryManager.

Is there a *Manager registry I can ask for service interfaces?

Best, Edoardo

Was it helpful?

Solution

go to ChannelManager and find usages of it. It will give you enough hits..like:

public static ChannelManager getChannelManager() {
    ComponentManager componentManager = HstServices.getComponentManager();
    if (componentManager == null) {
        return null;
    }

    return HstServices.getComponentManager().getComponent(ChannelManager.class.getName());

}

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top