1: <?php
2:
3: namespace Mapbender\WmsBundle\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: 13:
14: class WmsLoaderAdminType extends AbstractType
15: {
16:
17: 18: 19:
20: public function getName()
21: {
22: return 'wmsloader';
23: }
24:
25: 26: 27:
28: public function setDefaultOptions(OptionsResolverInterface $resolver)
29: {
30: $resolver->setDefaults(array(
31: 'application' => null
32: ));
33: }
34:
35: 36: 37:
38: public function buildForm(FormBuilderInterface $builder, array $options)
39: {
40: $builder->add('tooltip', 'text', array('required' => false))
41: ->add('target', 'target_element',
42: array(
43: 'element_class' => 'Mapbender\\CoreBundle\\Element\\Map',
44: 'application' => $options['application'],
45: 'property_path' => '[target]',
46: 'required' => false))
47: ->add('defaultFormat', 'choice',array(
48: "choices" => array(
49: "image/png" => "image/png",
50: "image/gif" => "image/gif",
51: "image/jpeg" => "image/jpeg")))
52: ->add('defaultInfoFormat', 'choice',array(
53: "choices" => array(
54: "text/html" => "text/html",
55: "text/xml" => "text/xml",
56: "text/plain" => "text/plain")))
57: ->add('autoOpen', 'checkbox', array('required' => false))
58: ->add('splitLayers', 'checkbox', array('required' => false));
59: }
60:
61: }
62:
63: ?>
64: