public static function setSitesFromArray($sites)
    {
        self::triggerSetSitesEvent($sites);

        foreach ($sites as $site) {
            $idSite = null;
            if (!empty($site['idsite'])) {
                $idSite = $site['idsite'];
            }

            self::setSiteFromArray($idSite, $site);
        }

        return $sites;
    }
public static function setSitesFromArray($sites)
    {
        self::triggerSetSitesEvent($sites);

        foreach ($sites as $site) {
            $idSite = null;
            if (!empty($site['idsite'])) {
                $idSite = $site['idsite'];
            }

            self::setSiteFromArray($idSite, $site);
        }

        return $sites;
    }
public static function setSitesFromArray ( $ sites ) { self :: triggerSetSitesEvent ( $ sites ) ; foreach ( $ sites as $ site ) { $ idSite = null ; if ( ! empty ( $ site [ 'idsite' ] ) ) { $ idSite = $ site [ 'idsite' ] ; } self :: setSiteFromArray ( $ idSite , $ site ) ; } return $ sites ; }
Sets the cached Site data with a non-associated array of site data.

This method will trigger the `Sites.setSites` event modifying `$sites` before setting cached
site data. In other words, this method will change the site data before it is cached and then
return the modified array.

@param array $sites The array of sites data. eg,

array(
array('idsite' => '1', 'name' => 'Site 1', ...),
array('idsite' => '2', 'name' => 'Site 2', ...),
)
@return array The modified array.
@deprecated
@internal
Sets the cached Site data with a non - associated array of site data .