foreach ($ex_class_event->_ref_constraints as $_ex_constraint) {
        $_ex_constraint->loadTargetObject();
        if ($_ex_constraint->_ref_target_object instanceof CMediusers) {
            $_ex_constraint->_ref_target_object->loadRefFunction();
        }
    }
    $unicity_spec->_locales["host"] = "Unique pour <strong>" . CAppUI::tr($ex_class_event->host_class) . "</strong>";
    if ($ex_class_event->host_class != "CMbObject" && $ex_class_event->host_class) {
        $host_object = new $ex_class_event->host_class();
        $reference1_class = $ex_class_event->_host_class_options["reference1"][0];
        $reference1 = new $reference1_class();
        $reference2_class = $ex_class_event->_host_class_options["reference2"][0];
        $reference2 = new $reference2_class();
    }
} else {
    $ex_class_event->disabled = "1";
    // The quotes are important !
    $ex_class_event->ex_class_id = $ex_class_id;
    $unicity_spec->_locales["host"] = "Unique pour <strong>" . $unicity_spec->_locales["host"] . "</strong>";
}
$classes = CExClassEvent::getExtendableSpecs();
$ex_object = new CExObject($ex_class_event->ex_class_id);
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("ex_class_event", $ex_class_event);
$smarty->assign("ex_object", $ex_object);
$smarty->assign("host_object", $host_object);
$smarty->assign("reference1", $reference1);
$smarty->assign("reference2", $reference2);
$smarty->assign("classes", $classes);
$smarty->display("inc_edit_ex_class_event.tpl");