public function get_related_tags() {
        $manual = $this->get_manual_related_tags();
        $automatic = $this->get_correlated_tags();
        $relatedtags = array_merge($manual, $automatic);

        // Remove duplicated tags (multiple instances of the same tag).
        $seen = array();
        foreach ($relatedtags as $instance => $tag) {
            if (isset($seen[$tag->id])) {
                unset($relatedtags[$instance]);
            } else {
                $seen[$tag->id] = 1;
            }
        }

        return $relatedtags;
    }
public function get_related_tags() {
        $manual = $this->get_manual_related_tags();
        $automatic = $this->get_correlated_tags();
        $relatedtags = array_merge($manual, $automatic);

        // Remove duplicated tags (multiple instances of the same tag).
        $seen = array();
        foreach ($relatedtags as $instance => $tag) {
            if (isset($seen[$tag->id])) {
                unset($relatedtags[$instance]);
            } else {
                $seen[$tag->id] = 1;
            }
        }

        return $relatedtags;
    }
public function get_related_tags ( ) { $ manual = $ this -> get_manual_related_tags ( ) ; $ automatic = $ this -> get_correlated_tags ( ) ; $ relatedtags = array_merge ( $ manual , $ automatic ) ; // Remove duplicated tags (multiple instances of the same tag). $ seen = array ( ) ; foreach ( $ relatedtags as $ instance => $ tag ) { if ( isset ( $ seen [ $ tag -> id ] ) ) { unset ( $ relatedtags [ $ instance ] ) ; } else { $ seen [ $ tag -> id ] = 1 ; } } return $ relatedtags ; }
Returns tags related to a tag

Related tags of a tag come from two sources:
- manually added related tags, which are tag_instance entries for that tag
- correlated tags, which are calculated

@return core_tag_tag[] an array of tag objects
Returns tags related to a tag