Created
December 6, 2010 18:00
-
-
Save dator-zz/730648 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* I have to table, one user table and one company table. | |
An user belongs to a company (and a company has many users) . | |
In the user form, i have the embed form for company. | |
*/ | |
class myGuardRegisterForm extends BasesfGuardRegisterForm | |
{ | |
/** | |
* @see sfForm | |
*/ | |
public function configure() | |
{ | |
unset($this['company_id']); | |
$companyform = new CompanyForm(); | |
$this->embedForm('company', $companyform); | |
} | |
} | |
/* I would like to, when an user is created, | |
create a company with the embed form and assign this company to the user saved. | |
How I can accomplish that the simple ( and the symfonish) way ? Thanks :) | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks :) But found an easy way :
just works :)