setSiteFromArray() public static method

Plugins can filter the website attributes before it is cached, eg. to change the website name, creation date, etc.
public static setSiteFromArray ( $idSite, $infoSite )
$idSite
$infoSite
Esempio n. 1
0
 /**
  * Returns the website information : name, main_url
  *
  * @throws Exception if the site ID doesn't exist or the user doesn't have access to it
  * @param int $idSite
  * @return array
  */
 public function getSiteFromId($idSite)
 {
     Piwik::checkUserHasViewAccess($idSite);
     $site = $this->getModel()->getSiteFromId($idSite);
     Site::setSiteFromArray($idSite, $site);
     return $site;
 }