protected static function get_discussion_area(\stdClass $discussion) : Array {
        $pathparts = [];
        if (!empty($discussion->groupname)) {
            $pathparts[] = get_string('groups');
            $pathparts[] = $discussion->groupname;
        }

        $parts = [
            $discussion->id,
            $discussion->name,
        ];

        $discussionname = implode('-', $parts);

        $pathparts[] = get_string('discussions', 'mod_forum');
        $pathparts[] = $discussionname;

        return $pathparts;
    }
protected static function get_discussion_area(\stdClass $discussion) : Array {
        $pathparts = [];
        if (!empty($discussion->groupname)) {
            $pathparts[] = get_string('groups');
            $pathparts[] = $discussion->groupname;
        }

        $parts = [
            $discussion->id,
            $discussion->name,
        ];

        $discussionname = implode('-', $parts);

        $pathparts[] = get_string('discussions', 'mod_forum');
        $pathparts[] = $discussionname;

        return $pathparts;
    }
protected static function get_discussion_area ( \ stdClass $ discussion ) : Array { $ pathparts = [ ] ; if ( ! empty ( $ discussion -> groupname ) ) { $ pathparts [ ] = get_string ( 'groups' ) ; $ pathparts [ ] = $ discussion -> groupname ; } $ parts = [ $ discussion -> id , $ discussion -> name , ] ; $ discussionname = implode ( '-' , $ parts ) ; $ pathparts [ ] = get_string ( 'discussions' , 'mod_forum' ) ; $ pathparts [ ] = $ discussionname ; return $ pathparts ; }
Get the discussion part of the subcontext.

@param   \stdClass   $discussion The discussion
@return  array
Get the discussion part of the subcontext .