Adding a transition on a widget via the API


I’m trying to add a transition on a widget, that works from the CMS, but I haven’t figured out how to do it via the PHP API.

I found this function : XiboRegion->edit
However, that function doesn’t allow to add transition on widget, but only on regions.

So is there another option to add transitions on a specific widget ?
Many thanks

I’ve seen this function :
but I couldn’t find it in any PHP files, and within postman, it always assign null no matter what datas I send.