public function getPageUid()
    {
        switch ($this->getCurrentSource()) {
            case self::SOURCE_MANUAL:
                $result = $this->storedPageUid;
                break;
            case self::SOURCE_FRONT_END:
                $result = (int)$this->getFrontEndController()->id;
                break;
            case self::SOURCE_BACK_END:
                $result = (int)GeneralUtility::_GP('id');
                break;
            default:
                $result = 0;
        }

        return $result;
    }