Skip to content

Instantly share code, notes, and snippets.

@odino
Created August 25, 2010 09:43
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 odino/549195 to your computer and use it in GitHub Desktop.
Save odino/549195 to your computer and use it in GitHub Desktop.
###### CONTROLLER
$this->form = new myForm(array(), array('user' => $this->getUser()));
###### FORM
public function configure()
{
parent::configure();
if(!$this->getOption('user') instanceOf myUserClass)
{
throw new ...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment