Skip to content

Instantly share code, notes, and snippets.

@meDavid
Last active March 8, 2017 10:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save meDavid/9ea29a81305950d333cdc37ebd6acc17 to your computer and use it in GitHub Desktop.
Save meDavid/9ea29a81305950d333cdc37ebd6acc17 to your computer and use it in GitHub Desktop.
<?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