protected static function get_subcontext($forum, $discussion = null, $post = null) {
        $subcontext = [];
        if (null !== $discussion) {
            $subcontext += self::get_discussion_area($discussion);

            if (null !== $post) {
                $subcontext[] = get_string('posts', 'mod_forum');
                $subcontext = array_merge($subcontext, static::get_post_area_for_parent($post));
            }
        }

        return $subcontext;

    }
protected static function get_subcontext($forum, $discussion = null, $post = null) {
        $subcontext = [];
        if (null !== $discussion) {
            $subcontext += self::get_discussion_area($discussion);

            if (null !== $post) {
                $subcontext[] = get_string('posts', 'mod_forum');
                $subcontext = array_merge($subcontext, static::get_post_area_for_parent($post));
            }
        }

        return $subcontext;

    }
protected static function get_subcontext ( $ forum , $ discussion = null , $ post = null ) { $ subcontext = [ ] ; if ( null !== $ discussion ) { $ subcontext += self :: get_discussion_area ( $ discussion ) ; if ( null !== $ post ) { $ subcontext [ ] = get_string ( 'posts' , 'mod_forum' ) ; $ subcontext = array_merge ( $ subcontext , static :: get_post_area_for_parent ( $ post ) ) ; } } return $ subcontext ; }
Get the subcontext for the supplied forum, discussion, and post combination.

@param   \stdClass   $forum The forum.
@param   \stdClass   $discussion The discussion
@param   \stdClass   $post The post.
@return  array
Get the subcontext for the supplied forum discussion and post combination .