public static function get_conversation_by_area(string $component, string $itemtype, int $itemid, int $contextid) {
        global $DB;

        return $DB->get_record('message_conversations',
            [
                'itemid' => $itemid,
                'contextid' => $contextid,
                'component' => $component,
                'itemtype'  => $itemtype
            ]
        );
    }
public static function get_conversation_by_area(string $component, string $itemtype, int $itemid, int $contextid) {
        global $DB;

        return $DB->get_record('message_conversations',
            [
                'itemid' => $itemid,
                'contextid' => $contextid,
                'component' => $component,
                'itemtype'  => $itemtype
            ]
        );
    }
public static function get_conversation_by_area ( string $ component , string $ itemtype , int $ itemid , int $ contextid ) { global $ DB ; return $ DB -> get_record ( 'message_conversations' , [ 'itemid' => $ itemid , 'contextid' => $ contextid , 'component' => $ component , 'itemtype' => $ itemtype ] ) ; }
Get conversation by area.

@param string $component Defines the Moodle component which the area was added to.
@param string $itemtype Defines the type of the component.
@param int $itemid The id of the component.
@param int $contextid The id of the context.
@return \stdClass
Get conversation by area .