public function set_tags($tags) {
        $this->tags = [];
        foreach ($tags as $tag) {
            // We use $tag->id as the key for the array so not only it handles duplicates of the same tag being given,
            // but also it is consistent with the behaviour of set_tags_by_id() below.
            $this->tags[$tag->id] = $tag;
        }
    }
public function set_tags($tags) {
        $this->tags = [];
        foreach ($tags as $tag) {
            // We use $tag->id as the key for the array so not only it handles duplicates of the same tag being given,
            // but also it is consistent with the behaviour of set_tags_by_id() below.
            $this->tags[$tag->id] = $tag;
        }
    }
public function set_tags ( $ tags ) { $ this -> tags = [ ] ; foreach ( $ tags as $ tag ) { // We use $tag->id as the key for the array so not only it handles duplicates of the same tag being given, // but also it is consistent with the behaviour of set_tags_by_id() below. $ this -> tags [ $ tag -> id ] = $ tag ; } }
Set some tags for this quiz slot.

@param \core_tag_tag[] $tags
Set some tags for this quiz slot .