public function get_first_discussion_in_forum(forum_entity $forum) : ?discussion_entity {
        $records = $this->get_db()->get_records(self::TABLE, [
            'forum' => $forum->get_id(),
        ], 'timemodified ASC', '*', 0, 1);

        $records = $this->transform_db_records_to_entities($records);
        return count($records) ? array_shift($records) : null;
    }
public function get_first_discussion_in_forum(forum_entity $forum) : ?discussion_entity {
        $records = $this->get_db()->get_records(self::TABLE, [
            'forum' => $forum->get_id(),
        ], 'timemodified ASC', '*', 0, 1);

        $records = $this->transform_db_records_to_entities($records);
        return count($records) ? array_shift($records) : null;
    }
public function get_first_discussion_in_forum ( forum_entity $ forum ) : ? discussion_entity { $ records = $ this -> get_db ( ) -> get_records ( self :: TABLE , [ 'forum' => $ forum -> get_id ( ) , ] , 'timemodified ASC' , '*' , 0 , 1 ) ; $ records = $ this -> transform_db_records_to_entities ( $ records ) ; return count ( $ records ) ? array_shift ( $ records ) : null ; }
Get the first discussion in the specified forum.

@param   forum_entity $forum
@return  discussion_entity|null
Get the first discussion in the specified forum .