original_string: public function getSitesWithAdminAccess($fetchAliasUrls = false, $pattern = false, $limit = false)
      {
          $sitesId = $this->getSitesIdWithAdminAccess();
  
          if ($pattern === false) {
              $sites = $this->getSitesFromIds($sitesId, $limit);
          } else {
              $sites = $this->getModel()->getPatternMatchSites($sitesId, $pattern, $limit);
  
              foreach ($sites as &$site) {
                  $this->enrichSite($site);
              }
  
              $sites = Site::setSitesFromArray($sites);
          }
  
          if ($fetchAliasUrls) {
              foreach ($sites as &$site) {
                  $site['alias_urls'] = $this->getSiteUrlsFromId($site['idsite']);
              }
          }
  
          return $sites;
      }
code: public function getSitesWithAdminAccess($fetchAliasUrls = false, $pattern = false, $limit = false)
      {
          $sitesId = $this->getSitesIdWithAdminAccess();
  
          if ($pattern === false) {
              $sites = $this->getSitesFromIds($sitesId, $limit);
          } else {
              $sites = $this->getModel()->getPatternMatchSites($sitesId, $pattern, $limit);
  
              foreach ($sites as &$site) {
                  $this->enrichSite($site);
              }
  
              $sites = Site::setSitesFromArray($sites);
          }
  
          if ($fetchAliasUrls) {
              foreach ($sites as &$site) {
                  $site['alias_urls'] = $this->getSiteUrlsFromId($site['idsite']);
              }
          }
  
          return $sites;
      }
code_tokens: public function getSitesWithAdminAccess ( $ fetchAliasUrls = false , $ pattern = false , $ limit = false ) { $ sitesId = $ this -> getSitesIdWithAdminAccess ( ) ; if ( $ pattern === false ) { $ sites = $ this -> getSitesFromIds ( $ sitesId , $ limit ) ; } else { $ sites = $ this -> getModel ( ) -> getPatternMatchSites ( $ sitesId , $ pattern , $ limit ) ; foreach ( $ sites as & $ site ) { $ this -> enrichSite ( $ site ) ; } $ sites = Site :: setSitesFromArray ( $ sites ) ; } if ( $ fetchAliasUrls ) { foreach ( $ sites as & $ site ) { $ site [ 'alias_urls' ] = $ this -> getSiteUrlsFromId ( $ site [ 'idsite' ] ) ; } } return $ sites ; }
docstring: Returns the list of websites with the 'admin' access for the current user.
  For the superUser it returns all the websites in the database.
  
  @param bool $fetchAliasUrls
  @param false|string $pattern
  @param false|int    $limit
  @return array for each site, an array of information (idsite, name, main_url, etc.)
docstring_tokens: Returns the list of websites with the admin access for the current user . For the superUser it returns all the websites in the database .