original_string: protected function visitorGetPageIdByType($PageId,$PageType,$PageAlias)
  	{
  	    if ($PageType == self::PAGE_TYPE_NORMAL) 
  	    {
  	        ModuleVisitorLog::writeLog(__METHOD__ , __LINE__ , 'PageIdNormal: '. $PageId);
  	    	return $PageId;
  	    }
  	    
  	    if ($PageType == self::PAGE_TYPE_FORBIDDEN)
  	    {
  	        //Page ID von der 403 Seite ermitteln - nicht mehr
  	        ModuleVisitorLog::writeLog(__METHOD__ , __LINE__ , 'PageIdNormal over 403: '. $PageId);
  	        return $PageId; 
  	    }
  	    
          //Reader mit Parameter oder ohne?
          $uri = $_SERVER['REQUEST_URI']; // /news/james-wilson-returns.html
          $alias = '';
          //steht suffix (html) am Ende?
          $urlSuffix = \System::getContainer()->getParameter('contao.url_suffix'); // default: .html
          if (substr($uri,-strlen($urlSuffix)) == $urlSuffix)
          {
              //Alias nehmen
              $alias = substr($uri,strrpos($uri,'/')+1,-strlen($urlSuffix));
              if (false === $alias) 
              {
                  ModuleVisitorLog::writeLog(__METHOD__ , __LINE__ , 'PageIdReaderSelf: '. $PageId);
              	return $PageId; // kein Parameter, Readerseite selbst
              }
          }
          else 
          {
              $alias = substr($uri,strrpos($uri,'/')+1);
          }
          ModuleVisitorLog::writeLog(__METHOD__ , __LINE__ , 'Alias: '. $alias);
          
          if ($PageType == self::PAGE_TYPE_NEWS)
          {
              //alias = james-wilson-returns
              $objNews = \Database::getInstance()
                              ->prepare("SELECT id FROM tl_news WHERE alias=?")
                              ->limit(1)
                              ->execute($alias);
              if ($objNews->numRows > 0)
              {
                  ModuleVisitorLog::writeLog(__METHOD__ , __LINE__ , 'PageIdNews: '. $objNews->id);
                  return $objNews->id;
              } 
  	        
  	    }
  	    if ($PageType == self::PAGE_TYPE_FAQ)
  	    {
  	        //alias = are-there-exams-how-do-they-work
  	        $objFaq = \Database::getInstance()
                              ->prepare("SELECT id FROM tl_faq WHERE alias=?")
                              ->limit(1)
                              ->execute($alias);
  	        if ($objFaq->numRows > 0)
  	        {
  	            ModuleVisitorLog::writeLog(__METHOD__ , __LINE__ , 'PageIdFaq: '. $objFaq->id);
  	            return $objFaq->id;
  	        }
  	    }
  	    if ($PageType == self::PAGE_TYPE_ISOTOPE)
  	    {
  	        //alias = a-perfect-circle-thirteenth-step
  	        $objIsotope = \Database::getInstance()
                  	        ->prepare("SELECT id FROM tl_iso_product WHERE alias=?")
                  	        ->limit(1)
                  	        ->execute($alias);
  	        if ($objIsotope->numRows > 0)
  	        {
  	            ModuleVisitorLog::writeLog(__METHOD__ , __LINE__ , 'PageIdIsotope: '. $objIsotope->id);
  	            return $objIsotope->id;
  	        }
  	    }
  	    
  	    ModuleVisitorLog::writeLog(__METHOD__ , __LINE__ , 'Unknown PageType: '. $PageType);
  	}
code: protected function visitorGetPageIdByType($PageId,$PageType,$PageAlias)
  	{
  	    if ($PageType == self::PAGE_TYPE_NORMAL) 
  	    {
  	        ModuleVisitorLog::writeLog(__METHOD__ , __LINE__ , 'PageIdNormal: '. $PageId);
  	    	return $PageId;
  	    }
  	    
  	    if ($PageType == self::PAGE_TYPE_FORBIDDEN)
  	    {
  	        //Page ID von der 403 Seite ermitteln - nicht mehr
  	        ModuleVisitorLog::writeLog(__METHOD__ , __LINE__ , 'PageIdNormal over 403: '. $PageId);
  	        return $PageId; 
  	    }
  	    
          //Reader mit Parameter oder ohne?
          $uri = $_SERVER['REQUEST_URI']; // /news/james-wilson-returns.html
          $alias = '';
          //steht suffix (html) am Ende?
          $urlSuffix = \System::getContainer()->getParameter('contao.url_suffix'); // default: .html
          if (substr($uri,-strlen($urlSuffix)) == $urlSuffix)
          {
              //Alias nehmen
              $alias = substr($uri,strrpos($uri,'/')+1,-strlen($urlSuffix));
              if (false === $alias) 
              {
                  ModuleVisitorLog::writeLog(__METHOD__ , __LINE__ , 'PageIdReaderSelf: '. $PageId);
              	return $PageId; // kein Parameter, Readerseite selbst
              }
          }
          else 
          {
              $alias = substr($uri,strrpos($uri,'/')+1);
          }
          ModuleVisitorLog::writeLog(__METHOD__ , __LINE__ , 'Alias: '. $alias);
          
          if ($PageType == self::PAGE_TYPE_NEWS)
          {
              //alias = james-wilson-returns
              $objNews = \Database::getInstance()
                              ->prepare("SELECT id FROM tl_news WHERE alias=?")
                              ->limit(1)
                              ->execute($alias);
              if ($objNews->numRows > 0)
              {
                  ModuleVisitorLog::writeLog(__METHOD__ , __LINE__ , 'PageIdNews: '. $objNews->id);
                  return $objNews->id;
              } 
  	        
  	    }
  	    if ($PageType == self::PAGE_TYPE_FAQ)
  	    {
  	        //alias = are-there-exams-how-do-they-work
  	        $objFaq = \Database::getInstance()
                              ->prepare("SELECT id FROM tl_faq WHERE alias=?")
                              ->limit(1)
                              ->execute($alias);
  	        if ($objFaq->numRows > 0)
  	        {
  	            ModuleVisitorLog::writeLog(__METHOD__ , __LINE__ , 'PageIdFaq: '. $objFaq->id);
  	            return $objFaq->id;
  	        }
  	    }
  	    if ($PageType == self::PAGE_TYPE_ISOTOPE)
  	    {
  	        //alias = a-perfect-circle-thirteenth-step
  	        $objIsotope = \Database::getInstance()
                  	        ->prepare("SELECT id FROM tl_iso_product WHERE alias=?")
                  	        ->limit(1)
                  	        ->execute($alias);
  	        if ($objIsotope->numRows > 0)
  	        {
  	            ModuleVisitorLog::writeLog(__METHOD__ , __LINE__ , 'PageIdIsotope: '. $objIsotope->id);
  	            return $objIsotope->id;
  	        }
  	    }
  	    
  	    ModuleVisitorLog::writeLog(__METHOD__ , __LINE__ , 'Unknown PageType: '. $PageType);
  	}
code_tokens: protected function visitorGetPageIdByType ( $ PageId , $ PageType , $ PageAlias ) { if ( $ PageType == self :: PAGE_TYPE_NORMAL ) { ModuleVisitorLog :: writeLog ( __METHOD__ , __LINE__ , 'PageIdNormal: ' . $ PageId ) ; return $ PageId ; } if ( $ PageType == self :: PAGE_TYPE_FORBIDDEN ) { //Page ID von der 403 Seite ermitteln - nicht mehr ModuleVisitorLog :: writeLog ( __METHOD__ , __LINE__ , 'PageIdNormal over 403: ' . $ PageId ) ; return $ PageId ; } //Reader mit Parameter oder ohne? $ uri = $ _SERVER [ 'REQUEST_URI' ] ; // /news/james-wilson-returns.html $ alias = '' ; //steht suffix (html) am Ende? $ urlSuffix = \ System :: getContainer ( ) -> getParameter ( 'contao.url_suffix' ) ; // default: .html if ( substr ( $ uri , - strlen ( $ urlSuffix ) ) == $ urlSuffix ) { //Alias nehmen $ alias = substr ( $ uri , strrpos ( $ uri , '/' ) + 1 , - strlen ( $ urlSuffix ) ) ; if ( false === $ alias ) { ModuleVisitorLog :: writeLog ( __METHOD__ , __LINE__ , 'PageIdReaderSelf: ' . $ PageId ) ; return $ PageId ; // kein Parameter, Readerseite selbst } } else { $ alias = substr ( $ uri , strrpos ( $ uri , '/' ) + 1 ) ; } ModuleVisitorLog :: writeLog ( __METHOD__ , __LINE__ , 'Alias: ' . $ alias ) ; if ( $ PageType == self :: PAGE_TYPE_NEWS ) { //alias = james-wilson-returns $ objNews = \ Database :: getInstance ( ) -> prepare ( "SELECT id FROM tl_news WHERE alias=?" ) -> limit ( 1 ) -> execute ( $ alias ) ; if ( $ objNews -> numRows > 0 ) { ModuleVisitorLog :: writeLog ( __METHOD__ , __LINE__ , 'PageIdNews: ' . $ objNews -> id ) ; return $ objNews -> id ; } } if ( $ PageType == self :: PAGE_TYPE_FAQ ) { //alias = are-there-exams-how-do-they-work $ objFaq = \ Database :: getInstance ( ) -> prepare ( "SELECT id FROM tl_faq WHERE alias=?" ) -> limit ( 1 ) -> execute ( $ alias ) ; if ( $ objFaq -> numRows > 0 ) { ModuleVisitorLog :: writeLog ( __METHOD__ , __LINE__ , 'PageIdFaq: ' . $ objFaq -> id ) ; return $ objFaq -> id ; } } if ( $ PageType == self :: PAGE_TYPE_ISOTOPE ) { //alias = a-perfect-circle-thirteenth-step $ objIsotope = \ Database :: getInstance ( ) -> prepare ( "SELECT id FROM tl_iso_product WHERE alias=?" ) -> limit ( 1 ) -> execute ( $ alias ) ; if ( $ objIsotope -> numRows > 0 ) { ModuleVisitorLog :: writeLog ( __METHOD__ , __LINE__ , 'PageIdIsotope: ' . $ objIsotope -> id ) ; return $ objIsotope -> id ; } } ModuleVisitorLog :: writeLog ( __METHOD__ , __LINE__ , 'Unknown PageType: ' . $ PageType ) ; }
docstring: Get Page-ID by Page-Type
  
  @param integer $PageId
  @param integer $PageType
  @param string  $PageAlias
  @return integer
docstring_tokens: Get Page - ID by Page - Type