// get the document manager
    $dm = ...;