protected static function get_post_area_for_parent(\stdClass $post) {
        global $DB;

        $subcontext = [];
        if ($parent = $DB->get_record('forum_posts', ['id' => $post->parent], 'id, created, subject')) {
            $subcontext = array_merge($subcontext, static::get_post_area($parent));
        }
        $subcontext = array_merge($subcontext, static::get_post_area($post));

        return $subcontext;
    }
protected static function get_post_area_for_parent(\stdClass $post) {
        global $DB;

        $subcontext = [];
        if ($parent = $DB->get_record('forum_posts', ['id' => $post->parent], 'id, created, subject')) {
            $subcontext = array_merge($subcontext, static::get_post_area($parent));
        }
        $subcontext = array_merge($subcontext, static::get_post_area($post));

        return $subcontext;
    }
protected static function get_post_area_for_parent ( \ stdClass $ post ) { global $ DB ; $ subcontext = [ ] ; if ( $ parent = $ DB -> get_record ( 'forum_posts' , [ 'id' => $ post -> parent ] , 'id, created, subject' ) ) { $ subcontext = array_merge ( $ subcontext , static :: get_post_area ( $ parent ) ) ; } $ subcontext = array_merge ( $ subcontext , static :: get_post_area ( $ post ) ) ; return $ subcontext ; }
Get the parent subcontext for the supplied forum, discussion, and post combination.

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