source/Core/Controller/BaseController.php
public function getSidForWidget()
    {
        $oSession = $this->getSession();
        $sid = null;
        if (!$oSession->isActualSidInCookie()) {
            $sid = $oSession->getId();
        }

        return $sid;
    }
public function getSidForWidget()
    {
        $oSession = $this->getSession();
        $sid = null;
        if (!$oSession->isActualSidInCookie()) {
            $sid = $oSession->getId();
        }

        return $sid;
    }
public function getSidForWidget ( ) { $ oSession = $ this -> getSession ( ) ; $ sid = null ; if ( ! $ oSession -> isActualSidInCookie ( ) ) { $ sid = $ oSession -> getId ( ) ; } return $ sid ; }
Returns session ID, but only in case it is needed to be included for widget calls.
This basically happens on session change,
when session cookie is not equals to the actual session ID.

@return string|null
Returns session ID but only in case it is needed to be included for widget calls . This basically happens on session change when session cookie is not equals to the actual session ID .