Permalink
Browse files

chore(engine): removed deprecated functions from the ElggObject class

BREAKING CHANGE:
The deprecated function parameter support for $object->getSites() and
$object->addToSite() are removed. Update to the parameter usage as
defined in the ElggEntity functions.
  • Loading branch information...
jdalsem committed Jun 26, 2015
1 parent dea29b2 commit 5d02672b3333326359fdb13959c963bc8b2c0f29
Showing with 1 addition and 39 deletions.
  1. +1 −39 engine/classes/ElggObject.php
@@ -14,7 +14,7 @@
*
* @package Elgg.Core
* @subpackage DataModel.Object
*
*
* @property string $title The title, name, or summary of this object
* @property string $description The body, description, or content of the object
* @property array $tags Tags that describe the object (metadata)
@@ -175,44 +175,6 @@ public function setDisplayName($displayName) {
$this->title = $displayName;
}
/**
* Return sites that this object is a member of
*
* Site membership is determined by relationships and not site_guid.
*
* @todo Moved to \ElggEntity so remove this in 2.0
*
* @param array $options Options array. Used to be $subtype
* @param int $limit The number of results to return (deprecated)
* @param int $offset Any indexing offset (deprecated)
*
* @return array
*/
public function getSites($options = "", $limit = 10, $offset = 0) {
if (is_string($options)) {
elgg_deprecated_notice('\ElggObject::getSites() takes an options array', 1.9);
return get_site_objects($this->getGUID(), $options, $limit, $offset);
}
return parent::getSites();
}
/**
* 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);
}
/**
* {@inheritdoc}
*/

0 comments on commit 5d02672

Please sign in to comment.