1: <?php
2:
3: namespace Mapbender\CoreBundle\Element\Type;
4:
5: use Symfony\Component\Form\AbstractType;
6: use Symfony\Component\Form\FormBuilderInterface;
7: use Symfony\Component\OptionsResolver\OptionsResolverInterface;
8:
9: 10: 11:
12: class PrintClientAdminType extends AbstractType
13: {
14:
15: 16: 17:
18: public function getName()
19: {
20: return 'printclient';
21: }
22:
23: 24: 25:
26: public function setDefaultOptions(OptionsResolverInterface $resolver)
27: {
28: $resolver->setDefaults(array(
29: 'application' => null
30: ));
31: }
32:
33: 34: 35:
36: public function buildForm(FormBuilderInterface $builder, array $options)
37: {
38: $builder->add('tooltip', 'text', array('required' => false))
39: ->add('target_map', 'target_element',
40: array(
41: 'element_class' => 'Mapbender\\CoreBundle\\Element\\Map',
42: 'application' => $options['application'],
43: 'property_path' => '[target]',
44: 'required' => false))
45: ->add('autoOpen', 'checkbox',
46: array(
47: 'required' => false))
48: ->add('print_directly', 'checkbox',
49: array(
50: 'required' => false))
51: ->add('scales', 'text', array('required' => false))
52: ->add('rotatable', 'checkbox',
53: array(
54: 'required' => false))
55: ->add('optional_fields', 'text', array('required' => false));
56: }
57:
58: }