original_string: protected function getVisitorCategoriesByUsergroups()
  	{
  	    $arrVisitorCats = array();
  	    $objVisitorCat = \Database::getInstance()
                              ->prepare("SELECT
                                              `id`
                                            , `title`
                                            , `visitors_stat_protected`
                                            , `visitors_stat_groups`
                                         FROM
                                              tl_visitors_category
                                          WHERE 1
                                          ORDER BY
                                              title
                                          ")
                              ->execute();
  	    while ($objVisitorCat->next())
  	    {
  	        if ( true === $this->isUserInVisitorStatGroups($objVisitorCat->visitors_stat_groups,
                                                      (bool) $objVisitorCat->visitors_stat_protected) )
  	        {
  	            $arrVisitorCats[] = array
  	            (
  	                'id'    => $objVisitorCat->id,
  	                'title' => $objVisitorCat->title
  	            );
  	        }
  	    }
  	
  	    if (0 == count($arrVisitorCats))
  	    {
  	        $arrVisitorCats[] = array('id' => '0', 'title' => '---------');
  	    }
  	    return $arrVisitorCats;
  	}
code: protected function getVisitorCategoriesByUsergroups()
  	{
  	    $arrVisitorCats = array();
  	    $objVisitorCat = \Database::getInstance()
                              ->prepare("SELECT
                                              `id`
                                            , `title`
                                            , `visitors_stat_protected`
                                            , `visitors_stat_groups`
                                         FROM
                                              tl_visitors_category
                                          WHERE 1
                                          ORDER BY
                                              title
                                          ")
                              ->execute();
  	    while ($objVisitorCat->next())
  	    {
  	        if ( true === $this->isUserInVisitorStatGroups($objVisitorCat->visitors_stat_groups,
                                                      (bool) $objVisitorCat->visitors_stat_protected) )
  	        {
  	            $arrVisitorCats[] = array
  	            (
  	                'id'    => $objVisitorCat->id,
  	                'title' => $objVisitorCat->title
  	            );
  	        }
  	    }
  	
  	    if (0 == count($arrVisitorCats))
  	    {
  	        $arrVisitorCats[] = array('id' => '0', 'title' => '---------');
  	    }
  	    return $arrVisitorCats;
  	}
code_tokens: protected function getVisitorCategoriesByUsergroups ( ) { $ arrVisitorCats = array ( ) ; $ objVisitorCat = \ Database :: getInstance ( ) -> prepare ( "SELECT
                                              `id`
                                            , `title`
                                            , `visitors_stat_protected`
                                            , `visitors_stat_groups`
                                         FROM
                                              tl_visitors_category
                                          WHERE 1
                                          ORDER BY
                                              title
                                          " ) -> execute ( ) ; while ( $ objVisitorCat -> next ( ) ) { if ( true === $ this -> isUserInVisitorStatGroups ( $ objVisitorCat -> visitors_stat_groups , ( bool ) $ objVisitorCat -> visitors_stat_protected ) ) { $ arrVisitorCats [ ] = array ( 'id' => $ objVisitorCat -> id , 'title' => $ objVisitorCat -> title ) ; } } if ( 0 == count ( $ arrVisitorCats ) ) { $ arrVisitorCats [ ] = array ( 'id' => '0' , 'title' => '---------' ) ; } return $ arrVisitorCats ; }
docstring: Get visitor categories by usergroups
  
  @param array $Usergroups
  @return array
docstring_tokens: Get visitor categories by usergroups