OEModule\OphCoCvi\controllers\DefaultController::actionDisplayConsentSignature PHP Method

actionDisplayConsentSignature() public method

public actionDisplayConsentSignature ( $id )
$id
    public function actionDisplayConsentSignature($id)
    {
        $signature_element = $this->getManager()->getConsentSignatureElementForEvent($this->event);
        if (!$signature_element->checkSignature()) {
            throw new \CHttpException(404);
        }
        header('Content-Type: image/png');
        header('Expires: 0');
        header('Cache-Control: must-revalidate');
        imagepng(imagecreatefromstring($signature_element->getDecryptedSignature()));
    }