Created
August 9, 2012 09:24
-
-
Save gzankevich/3302637 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
class LeadMatchingOfficeViewingsType extends AbstractType | |
{ | |
public function buildForm(FormBuilder $builder, array $options) | |
{ | |
$builder | |
->add('viewings', 'collection', array( | |
'type' => new ViewingsListType() | |
)) | |
; | |
} | |
public function getName() | |
{ | |
return 'phoenix_crmbundle_leadmatchingofficeviewingstype'; | |
} | |
} |
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
class LeadViewingsType extends AbstractType | |
{ | |
public function buildForm(FormBuilder $builder, array $options) | |
{ | |
$builder | |
->add('lead_matching_offices', 'collection', array( | |
'type' => new LeadMatchingOfficeViewingsType() | |
)) | |
; | |
} | |
public function getName() | |
{ | |
return 'phoenix_crmbundle_leadviewings'; | |
} | |
} |
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
var_dump([errors]) | |
------------------- | |
array (size=2) | |
0 => string 'This form should not contain extra fields' (length=41) | |
'phoenix_crmbundle_leadviewings' => | |
array (size=1) | |
0 => string 'This form should not contain extra fields' (length=41) | |
var_dump($request->request->all()) | |
---------------------------------- | |
array (size=1) | |
'phoenix_crmbundle_leadviewings' => | |
array (size=2) | |
'_token' => string '520f9d6316f43313bdb1ae6eee250ee4925c5593' (length=40) | |
'lead_matching_offices' => | |
array (size=1) | |
0 => | |
array (size=1) | |
'viewings' => | |
array (size=1) | |
0 => | |
array (size=1) | |
'cancel' => string '1' (length=1) |
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
class ViewingsListType extends AbstractType | |
{ | |
public function buildForm(FormBuilder $builder, array $options) | |
{ | |
$builder | |
->add('cancel', 'checkbox', array( | |
'property_path' => false | |
)) | |
; | |
} | |
public function getName() | |
{ | |
return 'phoenix_crmbundle_viewingslisttype'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment