1: <?php
2:
3: namespace Mapbender\WmcBundle\Form\Type;
4:
5: use Mapbender\CoreBundle\Form\Type\StateType;
6: use Mapbender\WmsBundle\Form\Type\LegendUrlType;
7: use Mapbender\WmsBundle\Form\Type\OnlineResourceType;
8: use Symfony\Component\Form\AbstractType;
9: use Symfony\Component\Form\FormBuilderInterface;
10:
11:
12:
13: class WmcType extends AbstractType
14: {
15:
16: 17: 18:
19: public function getName()
20: {
21: return 'wmc';
22: }
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33: 34: 35:
36: public function buildForm(FormBuilderInterface $builder, array $options)
37: {
38: $builder->add('state', new StateType(),
39: array(
40: 'data_class' => 'Mapbender\CoreBundle\Entity\State'))
41: ->add('keywords', 'text',
42: array(
43: 'required' => false))
44: ->add('abstract', 'textarea',
45: array(
46: 'required' => false))
47: ->add('logourl', new LegendUrlType(),
48: array(
49: 'data_class' => 'Mapbender\WmsBundle\Component\LegendUrl'))
50: ->add('screenshot', 'file',
51: array(
52: 'required' => true))
53: ->add('descriptionurl', new OnlineResourceType(),
54: array(
55: 'data_class' => 'Mapbender\WmsBundle\Component\OnlineResource'));
56: }
57:
58: }
59: