showForm() публичный Метод

Print the network alias form
public showForm ( $ID, $options = [] ) : Nothing
$ID integer ID of the item
$options array - target for the Form - withtemplate template or basic computer
Результат Nothing (display)
Пример #1
0
        $alias->delete($_POST);
        Event::log($_POST["id"], $alias->getType(), 4, "setup", sprintf(__('%s purges an item'), $_SESSION["glpiname"]));
        if ($item) {
            Html::redirect($item->getLinkURL());
        } else {
            Html::redirect($CFG_GLPI['root_doc'] . "/front/central.php");
        }
    } else {
        if (isset($_POST["update"])) {
            $alias->check($_POST["id"], 'w');
            $alias->update($_POST);
            Ajax::refreshPopupMainWindow();
            Event::log($_POST["id"], $alias->getType(), 4, "setup", sprintf(__('%s updates an item'), $_SESSION["glpiname"]));
            Html::back();
        }
    }
}
if (isset($_GET['popup'])) {
    Html::popHeader(NetworkAlias::getTypeName(1), $_SERVER['PHP_SELF']);
    if (isset($_GET["rand"])) {
        $_SESSION["glpipopup"]["rand"] = $_GET["rand"];
    }
    $alias->showForm($_GET["id"], $_GET);
    echo "<div class='center'><br><a href='javascript:window.close()'>" . __('Back') . "</a>";
    echo "</div>";
    Html::popFooter();
} else {
    Html::header(NetworkAlias::getTypeName(2), $_SERVER['PHP_SELF'], 'inventory');
    $alias->showForm($_GET["id"], $_GET);
    Html::footer();
}