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;
    }