public function get_favourite(string $component, string $itemtype, int $itemid, \context $context) {
        try {
            return $this->repo->find_favourite(
                $this->userid,
                $component,
                $itemtype,
                $itemid,
                $context->id
            );
        } catch (\dml_missing_record_exception $e) {
            return null;
        }
    }