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;
    }
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;
    }
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 ; }
Returns the UID of the current page.

If manualPageUidSource is set to SOURCE_FRONT_END or SOURCE_BACK_END, this
function returns the UID set in this part. Otherwise starts with looking
into the manually set page UID, then if a FE page UID is present
and finally if a BE page UID is present.

@return int the ID of the current page, will be zero if no page is
present or no page source could be found
Returns the UID of the current page .