/**
  * Add this object to a site
  *
  * @param int $site_guid The guid of the site to add it to
  *
  * @return bool
  */
 function addToSite($site_guid)
 {
     return add_site_object($this->getGUID(), $site_guid);
 }
Esempio n. 2
0
 /**
  * Adds an object to the site.
  *
  * @param int $object_guid GUID
  *
  * @return bool
  */
 public function addObject($object_guid)
 {
     return add_site_object($this->getGUID(), $object_guid);
 }
Esempio n. 3
0
 /**
  * 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);
 }
Esempio n. 4
0
 /**
  * Adds an object to the site.
  *
  * @param int $object_guid GUID
  *
  * @return bool
  * @deprecated 1.9 Use \ElggSite::addEntity()
  */
 public function addObject($object_guid)
 {
     elgg_deprecated_notice('\\ElggSite::addObject() is deprecated. Use \\ElggEntity::addEntity()', 1.9);
     return add_site_object($this->getGUID(), $object_guid);
 }