@@ 1560-1569 (lines=10) @@ | ||
1557 | * @return array |
|
1558 | * @todo add type hint when \ElggUser and \ElggObject have been updates |
|
1559 | */ |
|
1560 | public function getSites($options = array()) { |
|
1561 | $options['relationship'] = 'member_of_site'; |
|
1562 | $options['relationship_guid'] = $this->guid; |
|
1563 | $options['inverse_relationship'] = false; |
|
1564 | if (!isset($options['site_guid']) || !isset($options['site_guids'])) { |
|
1565 | $options['site_guids'] = ELGG_ENTITIES_ANY_VALUE; |
|
1566 | } |
|
1567 | ||
1568 | return elgg_get_entities_from_relationship($options); |
|
1569 | } |
|
1570 | ||
1571 | /** |
|
1572 | * Tests to see whether the object has been fully loaded. |
@@ 352-361 (lines=10) @@ | ||
349 | * 'relationship', 'relationship_guid', 'inverse_relationship' |
|
350 | * @return array |
|
351 | */ |
|
352 | public function getEntities(array $options = array()) { |
|
353 | $options['relationship'] = 'member_of_site'; |
|
354 | $options['relationship_guid'] = $this->guid; |
|
355 | $options['inverse_relationship'] = true; |
|
356 | if (!isset($options['site_guid']) || !isset($options['site_guids'])) { |
|
357 | $options['site_guids'] = ELGG_ENTITIES_ANY_VALUE; |
|
358 | } |
|
359 | ||
360 | return elgg_get_entities_from_relationship($options); |
|
361 | } |
|
362 | ||
363 | /** |
|
364 | * Adds a user to the site. |