|
|
|
@ -113,6 +113,7 @@
|
|
|
|
|
$details = get_object_vars($this);
|
|
|
|
|
unset($details['server']);
|
|
|
|
|
$details['tags'] = $this->get_raw_tags();
|
|
|
|
|
$details['tags_custom'] = $this->get_derived_tags();
|
|
|
|
|
return $details;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -362,13 +363,10 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Return the tags associated with this room.
|
|
|
|
|
* @return \CommunityTag[] Tags as string array.
|
|
|
|
|
* Return the deroved tags associated with this room.
|
|
|
|
|
*/
|
|
|
|
|
function get_room_tags(): array {
|
|
|
|
|
global $ROOMS_USED_BY_PROJECT;
|
|
|
|
|
|
|
|
|
|
$user_tags = CommunityTag::from_user_tags($this->tags, remove_redundant: true);
|
|
|
|
|
function get_derived_tags(): array {
|
|
|
|
|
global $ROOMS_USED_BY_PROJECT, $TESTING_INCLUDE;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @var \CommunityTag[] $derived_tags
|
|
|
|
@ -454,7 +452,25 @@
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return [...$derived_tags, ...$user_tags];
|
|
|
|
|
if ($this->matched_by_list($TESTING_INCLUDE)) {
|
|
|
|
|
$derived_tags[] =
|
|
|
|
|
new CommunityTag(
|
|
|
|
|
"test",
|
|
|
|
|
TagType::RESERVED_TAG,
|
|
|
|
|
"This Community is intended for testing only."
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return $derived_tags;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Return the tags associated with this room.
|
|
|
|
|
* @return \CommunityTag[] Tags as string array.
|
|
|
|
|
*/
|
|
|
|
|
function get_room_tags(): array {
|
|
|
|
|
$user_tags = CommunityTag::from_user_tags($this->tags, remove_redundant: true);
|
|
|
|
|
return [...$this->get_derived_tags(), ...$user_tags];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|