문제

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

도움이 되었습니까?

해결책

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());

}

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top