/** * Add this object to a site * * @param \ElggSite $site The site to add this object to. This used to be the * the site guid (still supported by deprecated) * @return bool */ public function addToSite($site) { if (is_numeric($site)) { elgg_deprecated_notice('\\ElggObject::addToSite() takes a site entity', 1.9); return add_site_object($site, $this->getGUID()); } return parent::addToSite($site); }