LazyLoadPlugin::getCurrentContextId PHP Method

getCurrentContextId() public method

Get the current context ID or the site-wide context ID (0) if no context can be found.
public getCurrentContextId ( )
    function getCurrentContextId()
    {
        $context = PKPApplication::getRequest()->getContext();
        return is_null($context) ? 0 : $context->getId();
    }