Link modules in learning path

AmineB

Hi,

I'm trying to programmatically create a learning path, but i can't figure how to create links between modules.

I tried this : $link = LPManagedLink::createWithValues( $learning_path_id , $parent_content_id , $child_content_id); $link->save();

Any ideas on how i can achieve this ?

Thanks