public function hookPrepareForm(Dictionary $params)
    {
        $session = $params['session'];
        $form = $params['form'];
        if ($session !== null)
        {
            $nonce_name = Nonce::getParameterName();
            if (!isset($form[$nonce_name]))
            {
                $context = [];
                $nonce = Nonce::getNonce($form->getName(), $session, $context);
                $form->add(new FormField($nonce_name, Type::STRING, "hidden", $nonce));
            }
        }
    }