Skip to content

Instantly share code, notes, and snippets.

@bakura10
Created July 24, 2012 12:12
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 bakura10/3169598 to your computer and use it in GitHub Desktop.
Save bakura10/3169598 to your computer and use it in GitHub Desktop.
$this->add(array(
'type' => 'Zend\Form\Element\Collection',
'name' => 'properties',
'options' => array(
'label' => 'Please choose properties for this Asset',
'count' => 2,
'should_create_template' => true,
'allow_add' => true,
'target_element' => array(
'type' => 'DoctrineORMModule\Form\Element\DoctrineEntity',
'name' => 'property',
'options' => array(
'label' => 'Name of the Property',
'object_manager' => $em,
'target_class' => 'Asset\Entity\Property',
'property' => 'name'
),
'attributes' => array(
'required' => 'required'
)
));
)
)
));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment