Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
.....
class ConfirmEmailController extends Controller {
....
public function confirmEmailAction($id, $hash) {
$form = $this->applicationRepository->findByHash($id, $hash);
try {
$this->workflow->apply($form, 'confirm_application');
} catch(LogicException $e) {
// Cannot apply transition, probably already confirmed
}
....
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment