23 public function addRelationship(
int $guid_two,
string $relationship): bool {
24 $rel = new \ElggRelationship();
27 $rel->guid_two = $guid_two;
43 public function hasRelationship(
int $guid_two,
string $relationship): bool {
44 return (
bool)
_elgg_services()->relationshipsTable->check($this->guid, $relationship, $guid_two);
56 public function getRelationship(
int $guid_two,
string $relationship): ?\
ElggRelationship {
57 return _elgg_services()->relationshipsTable->check($this->guid, $relationship, $guid_two) ?: null;
70 public function getEntitiesFromRelationship(array
$options = []) {
83 public function countEntitiesFromRelationship(
string $relationship,
bool $inverse_relationship =
false): int {
85 'relationship' => $relationship,
86 'relationship_guid' => $this->guid,
87 'inverse_relationship' => $inverse_relationship,
99 public function removeRelationship(
int $guid_two,
string $relationship): bool {
100 return _elgg_services()->relationshipsTable->remove($this->guid, $relationship, $guid_two);
116 public function removeAllRelationships(
string $relationship =
'',
bool $inverse_relationship =
false): bool {
117 return _elgg_services()->relationshipsTable->removeAll($this->guid, $relationship, $inverse_relationship);
$relationship
Elgg default relationship view.
if($who_can_change_language=== 'nobody') elseif($who_can_change_language=== 'admin_only'&&!elgg_is_admin_logged_in()) $options
elgg_get_entities(array $options=[])
Fetches/counts entities or performs a calculation on their properties.
elgg_count_entities(array $options=[])
Returns a count of entities.
_elgg_services()
Get the global service provider.
$guid
Reset an ElggUpgrade.